Site logo

[Support request] Using standard pagination on static pages with query loops

Home Forums Support [Support request] Using standard pagination on static pages with query loops

Home Forums Support Using standard pagination on static pages with query loops

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2409250
    Rebecca

    Hi — I’ve been reading this thread, and it seems like the answer is *really* close to what I’m looking for, or at least was on track: https://generatepress.com/forums/topic/setting-up-standard-pagination-when-using-generate-press-with-generate-blocks/

    I’ve inherited a site that similarly had its archives set up on static pages. It would be a chore to completely redirect them all, so I would like to keep them if possible. I have them all working with query loops and pagination, except my paginated URLs all look like this: /blog/?query-c82e90c0-page=2 when ideally they’d look like this /blog/page/2/

    I’ve tested WP show posts, and it does the pagination exactly how I would need it to work, so (much like the poster above) it seems like it *should* work — but I can’t quite get it to.

    Is this possible with GPP 2.2 and Pro?

    *Also note: there’s some legacy code I’m dealing with that redirects external posts – it’s written a bit sloppily and that messes with the one of the categories, that’s why I suspect these archives are on static pages, it’s not ideal but I can’t get around it until phase 2.

    #2409266
    Fernando
    Customer Support

    It’s possible in GPP 2.2. However, you’ll need to use the actual Blog page in conjunction with the Block Element – Loop Template to do so.

    See here for reference: https://docs.generatepress.com/article/block-element-loop-template/

    Currently, you’re using a Static page for your Blog which wouldn’t work for the outcome you wish to achieve.

    #2409270
    Rebecca

    Yeah, and I’ve played with that a bit, but I’m locked into using static pages, which is why I ask.

    Is it just impossible? I figured since WP Show Posts does what I need there might be a solution for the GP Query.

    #2443761
    Fernando
    Customer Support

    Sorry for the late reply – your response somehow slipped through our system.

    The default structure (/page/2) is the core loop structure, which is reserved for standard theme loops.

    Our solution (using the query ID) allows for multiple lists to have pagination on a single page without affecting each other. It uses the same method as the WordPress core Query Loop block.

    Using the default structure for static pages on Query Loops may cause issues as it does in WP Show Posts. You can observe this if you place a WPSP list on a static page that has a page break.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.