How to display recent posts under a static homepage's content in 2013 theme?
-
Hi,
I am using Twenty Thirteen theme.
I have static home page instead of having the blog page as the home page I have a static page as the home page. Now, I am trying to display 5 recent posts under the content of this page. How would I go about this?
I do use this code
<h2>Recent Posts</h2> <?php $the_query = new WP_Query( 'showposts=5' ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <?php the_excerpt(); ?> <?php endwhile;?>
on other themes and it works fine,but with 2013 theme it doesn’t and I assume it’s the placement I am having trouble with. But I just can’t pinpoint where I have to put this code. Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to display recent posts under a static homepage's content in 2013 theme?’ is closed to new replies.