Title: Query Loop &#8211; Pagination Issue
Last modified: April 17, 2023

---

# Query Loop – Pagination Issue

 *  Resolved [fibon](https://wordpress.org/support/users/fibon/)
 * (@fibon)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/query-loop-pagination-issue/)
 * Hello! this is my first post, so I’d like to start by greeting the community.
   I am a relatively new WordPress user and I use Gutenberg.
 * I have a problem that I can’t solve on my own: The start point is example.com/
   books – and this is an archive for a Custom Post Type with a Query Loop that 
   has pagination. When I click “next” in the pagination, the URL looks unfriendly,
   like this: 
   **Page 2**– example.com/books/**?query=30/page=2** for the next page.
   When I go back to the previous one, it is: **Start Point**– example.com/books/**?
   query=30/page=1**,
 * What’s more, when I click on the page number – (between the next and previous
   elements), it looks like this: 
   **Page 2**– example.com/books/**?query-30-page
   =2&cst**, when I go back via previous: **Start Point** – example.com/books/**?
   query-30-page=1&cst**, when I go back via page number: **Start Point** -: example.
   com/books/**?cst**
 * I would like the effect to be simply: example.com/books/?page=2 for the next 
   page and example.com/books/ for the Start Point. Is it possible? I think the 
   current behavior may be bad for SEO, especially since I plan to use these loops
   on various pages.
 * Please provide guidance!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Dan Soschin](https://wordpress.org/support/users/dansoschin/)
 * (@dansoschin)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/query-loop-pagination-issue/#post-16662741)
 * Hi [@fibon](https://wordpress.org/support/users/fibon/),
 * If generating a list of posts is important for your SEO goal, you could create
   a specific page that queries collections of posts based on a tag or category.
   For example, you could tag all the books about science, and then create category
   pages such as /science/ that would then list out any book tagged/categorized 
   as “science”.
 * There are some plugins that can help with rewriting permalinks that you could
   explore, that complement dashboard >> settings >> permalinks.
 * [https://wordpress.org/plugins/search/custom+permalinks](https://wordpress.org/plugins/search/custom+permalinks)
 * There is the option of modifying the code of your site without a plugin.
 * You can read more about WP query variables and permalinks here: [https://codex.wordpress.org/WordPress_Query_Vars](https://codex.wordpress.org/WordPress_Query_Vars)
   and rewriting information here: [https://codex.wordpress.org/Rewrite_API](https://codex.wordpress.org/Rewrite_API)
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/query-loop-pagination-issue/#post-16664392)
 * > example.com/books/?page=2 for the next page and example.com/books/ for the 
   > Start Point. Is it possible?
 * No. You will need some unique parameter that identifies which query you want 
   paginated. books/?page=2 would indicate you want page 2 of the main /books/ query
   and not the one for your query loop. Any permalink structure that does not conflict
   with the existing ones is feasible. For example you could do something like example.
   com/books/ql-30/page/2/ if “ql-” always indicates a query loop ID and “30” uniquely
   identifies it.
 * It does mean you cannot have child pages whose slugs begin with “ql-“. That would
   create a conflict.
 *  Thread Starter [fibon](https://wordpress.org/support/users/fibon/)
 * (@fibon)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/query-loop-pagination-issue/#post-16680097)
 * [@dansoschin](https://wordpress.org/support/users/dansoschin/) [@bcworkz](https://wordpress.org/support/users/bcworkz/)
 * First of all, thank you for your responses. They gave me clues and directions
   where to look further and explore the topic. I have spent so much time on these
   issues that it is hard to imagine, returning to the point where I won’t change
   links for filtered Loops – the topic is beyond me. 
   Ultimately, archive pages
   won’t use query loop filters, so they have a default template and I only added
   a filter to change pages for archives like /page/2 etc. And some custom Query
   Loops will remain as they are.
 * The plus side, however, is that I have infiltrated quite a few cool places from
   databases, file hierarchy to various functions 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Query Loop – Pagination Issue’ is closed to new replies.

## Tags

 * [cpt](https://wordpress.org/support/topic-tag/cpt/)
 * [loops](https://wordpress.org/support/topic-tag/loops/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 3 replies
 * 3 participants
 * Last reply from: [fibon](https://wordpress.org/support/users/fibon/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/query-loop-pagination-issue/#post-16680097)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
