Published Posts do not show up on my blog page
-
Hi everyone!
I set up a website with the “ultra” theme. I use a static front page, and I want my posts to show up on the page I entered as the “Posts Page” at the “Reading Settings” page. I have published 2 test posts:
http://www.hlhlinguistics.ca/test-1/
http://www.hlhlinguistics.ca/test-2-2/
As you can see they display fine, but if you head to
http://www.hlhlinguistics.ca/blog/
which is the page I selected for my posts…nothing!I have of course tried to troubleshoot this using Google but unfortunately with no success. I’ve tried the following:
– Using a different template for the blog page (default template for static pages, blog for the blog page).
– Checking for a directory called blog on my server…there was none.
– Taking the section that starts with “<?php if (have_posts())”
and ends with “<?php endif; ?>” from the page.php file to replace the same section in both my index.php and page-blog.php (since that’s the template that page is now set to use.I will post the content of both these files below in case it helps:
page.php
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. Not the blockquote. ]
<?php // get theme panel options global $options; foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } ?> <?php get_header(); ?> <div id="main"> <div id="post"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> </div><!-- /post --> <?php endwhile;?> <?php endif; ?> </div><!-- /main --> <?php get_sidebar(); ?> <?php get_footer(); ?>
page-blog.php
<?php global $options; foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } ?> <?php /* Template Name: Blog */ ?> <?php get_header(); ?> <div id="main"> <div id="blog-description"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> </div><!-- /post --> <?php endwhile;?> <?php endif; ?> </div><!-- /blog-description --> <?php query_posts( array( 'paged'=>$paged)); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="entry"> <?php if ( has_post_thumbnail() ) { ?> <div class="entry-featured-image"> <a>" title="<?php the_title(); ?>"><?php the_post_thumbnail('blog-image'); ?></a> </div><!-- /entry-featured-image --> <?php } ?> <h2 class="entry-title"><a>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php if ($xs_disable_entry_meta == "true") { ?> <?php } else { ?> <div class="entry-meta"> Posted on <?php the_time('F jS, Y') ?> | <?php comments_popup_link('0 Comments »', '1 Comment »', '% Comments »'); ?> </div><!-- /entry-meta --> <?php } ?> <?php the_excerpt(''); ?> </div><!-- /entry --> <?php endwhile; ?> <?php endif; ?> <?php //Pagination if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?> </div><!-- /main --> <?php get_sidebar(); ?> <?php get_footer(); ?>
I have been trying to fix this for the past couple of hours and frankly I’m a bit lost now. Any help is much appreciated, thank you very much in advance!
- The topic ‘Published Posts do not show up on my blog page’ is closed to new replies.