treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Blog Posting Won't Display

  • Currently I have a site I am trying to set up on Wordpress. I have a bunch of pages that are relatively static but are using PHP. The code below is the template I named blog.php, I have only assigned this to the "Blog" page since its each page is unique. The "Blog" page is the only place I am using the posts function. I have a test post published and cannot seem to get it to display. Any ideas? http://architilestone.com/site2/blog/

    Let me know if you need more information. Thanks!



    <?php
    /*

    Template Name: Blog

    */

    get_header(); ?>

    <div id=\"content\" class=\"narrowcolumn\">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=\"post\" id=\"post-<?php the_ID(); ?>\">
    <h2><?php the_title(); ?></h2>
    <div class=\"entry\">
    <?php the_content('<p class=\"serif\">Read the rest of this page &raquo;</p>'); ?>

    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>
  • Use index.php and customise that to look the way want.