WP SITES

3093 Coded Tutorials & 297 Plugins

Add Pagination to AgentPress Pro Listings Archive Page

This PHP code enables you to paginate a CPT archive page using pre_get_posts with posts_per_page.

This code overrides your WordPress Reading settings for your CPT archives, in this case, for a custom post type named listing. Swap out listing in the code for use with any other CPT.

Code gets pasted at the end of your child themes functions file or custom functionality plugin.

Was this helpful?

Yes
No
Thanks for your feedback!

Leave a Reply