• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

pagination not working in Blog Template

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › pagination not working in Blog Template

This topic is: resolved

Tagged: blog template, custom templates, pagination

  • This topic has 5 replies, 2 voices, and was last updated 12 years, 3 months ago by cdils.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 1, 2013 at 6:13 pm #17261
    Cathy @ WPBarista
    Member

    I've been working on this for HOURs. I've tried custom widget areas instead, and static pages, finally settled on using the Blog template, and overwriting the page_blog.php template in the child theme with this: (which is showing pagination, but when arriving at the /page/2 and page/3/ etc, there are only the original posts showing:

     

    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action( 'genesis_loop', 'child_do_blog_loop' );
    
    function child_do_blog_loop() {
    
     $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
     $query_args = wp_parse_args( genesis_get_custom_field( 'query_args' ),array(
    
     'offset' =>5,
     'showposts' => 10,
     'paged' => $paged
    
     )
     );
    
     genesis_custom_loop( $query_args );
    }

    Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.
    February 4, 2013 at 3:00 pm #17990
    cdils
    Participant

    Hi Cathy,

    Can you post a link to a page using your page_blog.php template?

    Just to clarify, do you mean that your < Older Posts & Newer Posts links aren't showing?

    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    February 4, 2013 at 3:04 pm #17995
    Cathy @ WPBarista
    Member

    Hi Carrie,

    I had to re-do the whole thing many times. It turns out that WP wp_query and query_posts both don't like to offset & posts_per_page at the same time.

    The page navigation was showing up - but regardless of which page you were on, it always showed the content that should have been on page 1.  Very weird. We had to compromise on our results in this case.
    Thank you for offering your assistance!


    Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.
    February 4, 2013 at 3:12 pm #18005
    cdils
    Participant

    I've read several blog posts recently about going when to use wp_query vs query_posts. Here's a couple of them in case they might be helpful to you:

    http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts

    Customizing the WordPress Query with pre_get_posts

    Feel free to post followup questions if you want to muddle through anything together.

    Cheers,

    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

    February 4, 2013 at 5:01 pm #18065
    Cathy @ WPBarista
    Member

    Thanks Carrie. I did read those ones too, I spent way too much (unpaid) time on this!  Apparently paging has to be run through the wp_query which I did several times, using many code snippets from people much smarter than me. THen through many more searches read one of the WP developers discussing that it isn't possible to use offset & paginationin the same query. So the alternative suggestion is to preclude duplicate posts from the other loops on the page. But that created a new set of requirements from the client, so we negotiated on some expectations. Like how I said that? Negotiated on expectations. lol Have a great day!


    Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.
    February 4, 2013 at 5:32 pm #18083
    cdils
    Participant

    it isn’t possible to use offset & pagination in the same query.

    Glad to know that! Sorry you got there the long way. 🙁

    Good luck with those expectations and negotiations!! 🙂


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. 🙂

    I host a weekly WordPress-focused podcast called Office Hours. I tweet @cdils.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble