Support » Themes and Templates » Blog posts not showing up on blog page

  • Resolved holbri


    Hello all,

    I am new to wordpress and php. I built a custom theme using a static front page. My designated blog page is not showing posts. It does however create a new page.

    My blog is directed to page-lounge.php

    I am using conditional templates for all the pages. I pasted below the code for the blog page. All of my static pages are working.

    Thank you in advance for your help!

    	/* Template name: Lounge Page */
    <?php get_header(); ?>
    	<?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    		<h2 id="post-<?php the_ID(); ?>">
    <a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    			<div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    			<p class="postmetadata">
    Posted in <?php the_category(', ') ?>
    <?php edit_post_link('Edit','','<strong>|</strong>'); ?>
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    	<?php endwhile; ?>
    	<<div class="navigation">
     <div class="alignleft"><?php previous_posts_link('« Previous Entries') ?></div>
     <div class="alignright"><?php next_posts_link('Next Entries »','') ?></div>
     <?php else : ?>
     <h2 class="center">Not Found</h2>
     <p class="center">
    <?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
     <?php endif; ?>
    <?php get_sidebar('lounge'); ?>
    <?php get_footer(); ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi


    Forum Moderator

    My blog is directed to page-lounge.php

    Assuming your have configured WP to use a static front page via Settings -> Reading, your main posts (blog?) page will be using your theme’s index.php template file.

    Thanks esmi
    My settings for reading is static front page to home in menu. My homepage is page-home.php

    Posts still do not publish to page-lounge.php (my blog)

    Here is the permalink I get for test post

    I would like the post to publish to localhost/lounge/2012/10/24/test-post

    code for index.php is the same as page-lounge.php

    any ideas? Please let me know which code would be helpful to share. My site is on localhost.

    Thanks, Brian

    ok, it was a combination of my permalinks , settings for reading posts and my home.php was the php code from my static front page and not my blog page.

    Newbie errors…thank you again for your help.


    needed to mark this resolved…Brian

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blog posts not showing up on blog page’ is closed to new replies.