Try adding 'paged' => get_query_var( 'page' )
to your query.
EDIT : For pagination to work properly the posts per page should be greater than ‘Blog pages show at most’ under Settings-> Reading section of the WordPress Admin. So there are two ways you can make this work out.
- You can set ‘Blog pages show at most’ to 1. This would show 1 post in all the blog pages unless you specify post_per_pages specifically for each query.
- The other option you have would be to use the
pre_get_posts
filter.
Example of pre_get_post filter to limit the no. of posts on a location taxonomy archive page to 2 posts per page.
function location_posts( $query ) {
if( is_tax( 'location' ) ) {
$query->set('posts_per_page', '2');
}
return $query;
}
add_filter('pre_get_posts', 'location_posts');
Related Posts:
- pagination not working on custom-taxonomy template
- Custom Taxonomy Endpoint Pagination using paginate_links()
- Can’t get a custom template taxonomy page to display
- Custom Taxonomy Archive Page
- Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)
- get_query_var(‘paged’) always returns empty
- Taxonomy Templates… by hierarchical level?
- How to display a listing template of a certain taxonomy?
- How to use wp_terms_checklist() on front end
- Custom taxonomies, with custom rewrites/slug, AND loading a taxonomy archive template from a plugin
- Custom Taxonomy Template not respecting ‘include_children’ => ‘false’
- How can I set up a category “overview” page?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Which template name to use for taxonomies but not their terms?
- On Taxonomy Template page, want to add Post_Type
- Custom Taxonomy terms with latest post ordered by date pagination issue
- Listing child terms of parent term
- Make Custom Taxonomy Category Use Parent Template
- Custom taxonomy template not working
- Taxonomy page lead to 404 page on pagination
- Using a different template per Custom Taxonomies for single term archive pages
- Remove pagination from WooCommerce product categories on admin edit navigation menus
- Woocommerce custom taxonomies page
- Generic taxonomy-term template page
- 404 for a custom taxonomy?
- Why is my taxonomy template not shown?
- Meta description – template code to get category description
- Create and set templates for custom taxonomies
- How to have two different versions of a tag/category/taxonomy archive page?
- How do I create a custom archive page depending on the custom taxonomy type?
- How to create pagination for custom taxonomy in WordPress
- Taxonomy Pagination Rewrite
- Different single page templates for taxonomies
- problem in taxonomy-{taxonomy}.php pagination
- Sorting Custom Posts on Archive page with pagination
- Override Taxonomy Template
- Taxonomy Parent Name
- Custom taxonomy pagination
- Avoid taxonomy-%term%.php if more than one taxonomy
- Returning One custom taxonomy term name
- Make child taxonomy categories use a set template
- How can I make front page to display custom taxonomy page?
- Why get_page_template() doesn’t show taxonomy template file name?
- Problem with wordpress pagination
- How can I change the output display of my pagination?
- How can I get a paginated list of custom taxonomy tags with posts?
- How to add custom content to custom taxonomy
- how to access the $query variable inside taxonomy-xxx.php template file?
- Template file renders on local install, not on web
- Catch all taxonomy template
- Taxonomy archive uses incorrect template when query strings are used
- How to use custom slug and custom templates for custom taxonomy?
- Keeping session instance of random display results over pagination breaks
- add pagination in wordpress page template
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Pagination for Custom Taxonomy
- How to get a terms and posts associated with another term?
- pagination for list category posts ( Custom post type )
- Custom taxonomy archive template not recognised
- Post not showing in my custom advanced search
- Error 404 in Custom taxonomy with pagination
- How to display custom taxonomy
- Pagination with custom query (not using posts)
- WordPress doesn’t respect the template hierarchy?
- How to update WordPress custom SQL Select query for custom taxonomies so that syntax is correct?
- Can you orderby slug in a taxonomy archive page using WP_Query?
- Custom Taxonomy Template Variables Available?
- query posts returns 10 records
- add_rewrite_rule pagination 404 error on page 4 and above
- Pagination links not working for custom taxonomy
- is_tax not working for custom taxonomy
- How to only list the child terms of a taxonomy and not their parents?
- get_terms() returns an empty array
- Permalinks for quote authors
- Using a loop to display terms associated with a post
- In a loop of custom post type, display first custom taxonomy term
- Taxonomy page template changing when using query variables
- How to add autocomplete to custom taxonomy for CPT
- List subcategory on taxonomy term page
- Using wp_list_categories to show more than one custom taxonomy
- Show all posts without a custom taxonomy
- How do I taxonomy terms based on terms they are used alongside?
- How can I populate a select element with terms from a custom taxonomy and filter post results?
- How do I list the pages of a custom taxonomy?
- Can you filter wp_dropdown_categories with terms meta?
- one term two taxonomy’s?
- Order by taxonomy Value [duplicate]
- Category list with indent children list below current category
- Some of my custom taxonomies are not showing but still counted in a WPMU set up
- Display all taxonomy, children and grandchildren with links
- Using custom taxonomies to display hierarchical URLs?
- tax_query: Don’t show posts with parent term when they have a corresponding child term applied
- Why can’t I access Custom Taxonomy metadata?
- Permalinks with custom taxonomies and regular categories
- WP_Query tax_query – Show results if child has parent X
- Trash Bin for Categories?
- Change taxonomy of posts
- Get Posts with matching lowest taxonomies
- Any way to make custom taxonomy field searchable?
- Select Custom Taxonomy from Theme Options