Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Query Loop pagination breaks when using “generateblocks_query_loop_args”

  • When the Inherit Query from Template option is enabled, you should be modifying the main query of the blog, instead of modifying the query loop block’s output.

    In your case, you do NOT need to enable the Inherit Query from Template option.

    Just need to set the posts per page to 9 for the query loop, and it should work.

    Let me know 🙂

  • Can you provide me a code to modify the main query of the blog?
    I want “Inherit Query from Template” option enabled.
    When it is disabled, you get urls like this.
    domain.com/?query-847a2065-page=2

    But when you use inherit query the url looks better:

    /page/2/

    I want this feature.
    I added a link in Private Information.

  • Hi there,

    This is a kind of hacky way to do it, but it works.

    Add this PHP snippet:

    add_action('init', function() {
        if (isset($_GET['query-847a2065-page']) && $_GET['query-847a2065-page'] == '2') {
            wp_redirect(home_url('/page/2/'));
            exit();
        }
    });
Viewing 3 posts - 17 through 19 (of 19 total)
  • You must be logged in to reply to this topic.