• Resolved Ashley

    (@skywalkerisnull)


    Hello everyone,

    My WordPress site is privately hosted on a device on my home network, with a firewall to only allow my IP address to access it. I am using Staatic to publish it to github pages. I now have enough posts that the Pagination block of the Query Loop is active. However, when Staatic crawls and then publishes the site, the Pagination does not work. It looks like it is doing a URL change/update, but still using the query string of the original link, which won’t work as there is no server to respond to the query.

    Has anyone got this working previously? Or know of any tricks/settings to get Staatic to interpret these query strings, and update them with a static link, and rendering of the next page?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Team Staatic

    (@staatic)

    Hi Ashley, thanks for posting your issue regarding pagination. Generally, static sites do not support query strings (e.g., ?page=2). Instead, pagination should be handled with pretty permalinks, such as /page/2/, /page/3/, etc. This should work seamlessly with Staatic.

    To better assist you, could you please provide the following details:

    • An original HTML snippet where pagination is implemented on the dynamic site.
    • A HTML snippet of the same after being processed by Staatic.
    • The configured “Destination URL”, which can be found under Staatic > Settings > Build in your WordPress dashboard.

    If there are any specific configurations or additional details you think might be affecting how pagination is handled, those would be helpful as well. For a comprehensive view of your site’s setup, you can provide the site information by navigating to WP-Admin > Tools > Site Health > Info (tab) and clicking “Copy site info to clipboard”, then sending it to [email protected].

    Looking forward to your response to help get this sorted out!

    Thread Starter Ashley

    (@skywalkerisnull)

    Hello,

    I have sent through most of those details to the contact email address. There are no additional settings that I can think of that would be impacting it.

    Plugin Author Team Staatic

    (@staatic)

    We’ve identified that the Pagination block editor widget sometimes generates query string links instead of pretty URLs, which can cause issues, especially on static sites. The root of this issue seems to be tied to how the Pagination block interacts with the WordPress theme and settings. Specifically, if the query loop does not inherit from the global query, it generates query string URLs, which are not compatible with all setups.

    A successful workaround that has helped in this scenario involves setting the desired page as the site’s “Posts page” under Settings > Reading in WP-Admin. This adjustment ensures that the Pagination block correctly inherits from the global query and thereby generates pretty URLs.

    For those experiencing similar issues, please try adjusting your “Posts page” settings and consider the compatibility of your WordPress theme with the block editor’s pagination widget.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Query Loop with Pagination’ is closed to new replies.