Pagination on blog-excerpt.php
  • This is a follow-up from a question previously asked on wordpress.org.

    I have a site (wheretofeed.com) and I created a child there so that I could edit blog-excerpt.php to allow for a single category to be displayed. I changed the code, in line with Emil's suggestion, which was to replace the following section in blog-excerpt.php:

    <?php if ( get_query_var('paged') ) $paged = get_query_var('paged'); elseif ( get_query_var('page') ) $paged = get_query_var('page'); else $paged = 1; query_posts("post_type=post&paged=$paged"); ?> with :

    <?php if ( get_query_var('paged') ) $paged = get_query_var('paged'); elseif ( get_query_var('page') ) $paged = get_query_var('page'); else $paged = 1; query_posts( array ( // category name 'category_name' => 'featured', // number of posts 'posts_per_page' => 3 ) ); ?> This worked, but it had the side effect of only showing the last three posts: that is to say, it didn't offer any pagination type links to the remaining posts. The "Older Posts" and "Newer Posts" hyperlinks at the bottom didn't help either. I am stuck with viewing the last three posts unless I go in via the Archives function.

    Is it possible to achieve the "1 2 3 Next" type links at the bottom of the page, with 3 results per page (i.e. whatever number is assigned to 'posts_per_page').

    Any help would be greatly appreciated.

  • We cannot assist with this level of customization. You might consider picking up a pagination plugin:

    http://wordpress.org/extend/plugins/wp-pagenavi/

  • Thank you. Has that plugin been tested with this theme?

    Also, is there a reason that the "Older Posts" hyperlink doesn't work as expected?

    I understand that you cannot assist with the customisation but I would be grateful for any assistance with the navigation functionality that's already built into the theme.

  • Plugin should be working with Responsive and most of the other Themes as well, please follow the instructions on the plugins page how to integrate: http://wordpress.org/extend/plugins/wp-pagenavi/installation/

    Take a look at this demo: http://themeid.com/demo/responsive/layout-test/ pagination and prev/next are working.

    Thanks, Emil

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

    Most Popular This Week