Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

on my Wordpress site on the first page I always get my posts displaying however when I navigate to my 'Blog' page with my blog template attached to it I cant get my posts to display here.

I used a wordpress function to echo out the current page template on the first page and it is getting the index.php template. My blog page is getting the blog template. I have copied and pasted the code

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>

<?php the_content(); ?>

<p><?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> | <?php the_category(', '); ?> | <?php comments_number('No comment', '1 comment', '% comments'); ?></p>

<?php comments_template(); // Get wp-comments.php template ?> 

<?php endwhile; else: ?>

<h2>Woops...</h2>

<p>Sorry, no posts we're found.</p>

<?php endif; ?>

<p align="center"><?php posts_nav_link(); ?></p>

</div>

But i only get the form for posting comments. Any ideas what I may be doing wrong I would have thought it blog.php had the same code as index.php they would look identical..

Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

From the "Settings" menu in the wordpress admin panel Select the "Reading" options and select your blog page for "Posts Page" from the dropdown beside it, see the screenshot here http://d.pr/i/h4nV

Hope it will help

share|improve this answer
    
Awesome man, thanks!! I had used this before to set the front page to static but didnt realise there was an option for your blogs post too. Thanks Again. Just one other question when I click on the blog post it says 'Comments are closed' and gives me and wont let me respond. Is there another option I have to change to allow this? I am logged in as admin.. –  NATHAN C Mar 23 '13 at 18:05
    
You can turn on comments and other settings from the Settings->Discussion sections Also, for each of the posts you can turn on/off commenting by opening the post in edit mode, then click on "Screen" on the top right corner, then check the "Discussion" checkbox. After that, you will find a new metabox under the post content/excerpt area from where you can Allow commenting :) –  Hasin Hayder Mar 23 '13 at 18:09
    
Don't forget to select the answer which solves your problem as accepted answer. It encourage the person who answer your question in StackExchange. –  Hasin Hayder Mar 23 '13 at 18:14
    
When i click on screen options it doesnt do anything Hasin.. –  NATHAN C Mar 23 '13 at 18:28
    
it should scroll down and show a list of options (make sure you are in the post in edit mode ) –  Hasin Hayder Mar 23 '13 at 18:29
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.