How to Remove Pagination for Repeater Queries in Oxygen

The Repeater component in Oxygen shows pagination out of the box when the WP Query type is set to custom with a fixed number of Posts per page for the Count (provided of course there are more entries to be shown).

Let’s take this example where we set 5 entries of a portfolio CPT (Custom Post Type) to be shown:

Sample output on the frontend (with the entry title added inside the Repeater Div):

Let’s say the requirement is to show only 5 posts without the pagination.

To remove the pagination, display can be set to none in the CSS. But there is a better way than hiding stuff under the carpet.

Change the Query type to manual and append &no_found_rows=true to the Query Params.

Ex.:

post_type=portfolio&posts_per_page=5&no_found_rows=true

Result:

Setting no_found_rows to true will fetch exactly the specified number of posts from the database.

You need to make sure the actual query part, post_type=portfolio&posts_per_page=5 reflects what you wish to set. See these two tutorials for help on this:

https://wpdevdesign.com/manual-query-params-in-oxygen/

https://wpdevdesign.com/how-to-generate-the-query-string-for-easy-posts-in-oxygen/


Posted

in

,

by

Tags:

Comments

One response to “How to Remove Pagination for Repeater Queries in Oxygen”

  1. […] Remember that to not show pagination you need to append &no_found_rows=true in the manual query string. Reference. […]

Leave a Reply to Advanced Queries in Oxygen | Tutorial Cancel reply

Your email address will not be published. Required fields are marked *