• Is there any function to change pagination url to a static url?

    Pagination URL link from


    change to static URL


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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Platinums


    I’ve add Post List in frontpage. In Post List pagination, the link became website.com/?query-18-page=2/ and I want to change URL to website.com/page/2/


    This is from the query loop block. This is how its’ pagination URLs work.


    This is the normal WordPress pagination.

    As the Query Loop block can be placed anywhere on any page (even multiple blocks on a single page), it can’t use the normal WordPress pagination permalinks.

    For instance, let’s say you have two instances of the QL block each fetching posts from a different category with pagination. If each block’s second-page listing points to example.com/page/2/, how does WordPress know which category to fetch? It doesn’t.

    That’s why a different pagination URL scheme is used, which includes an ID for the specific instance of the query loop blook.

    As with all things WordPress, it should be possible to customize the QL block’s pagination URLs by custom coding. But that’s something beyond my pay scale 😀

    Good luck!

    Thread Starter Platinums


    Yeah bro, still searching how to modify that to a normal pagination.

    Moderator bcworkz


    You really cannot use website.com/page/2/ format for a query loop because it’ll mess up all other default pagination schemes. What you can do is implement some other pagination scheme, for example: website.com/ql-18/page/2/. The “ql-18” uniquely identifies one particular query loop instance. It can be whatever you want (other than existing schemes), but it has to relate to a specific query loop.

    You can then add a custom rewrite rule that matches the /ql-18/page/2/ sequence and captures the “18” and “2” portions so that the request can be rewritten into a format WP understands: index.php?query-18-page=2/
    No one will see this version, it’s used internally by WP. Users will only see the website.com/ql-18/page/2/ version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to change Pagination URL link from /?query-18-page=2/ to /page/2/’ is closed to new replies.