First of all: never use query_posts
: when you need to change the main query, is a lot better use the pre_get_posts
hook: your site users will thank you, once performance will increase.
If the custom taxonomy study_tags
is used only for study
CPT the only reason to change default query is to set post parent to 0
.
add_action('pre_get_posts','set_study_parent');
function set_study_parent( $query ) {
if ( ! is_admin() && is_main_query() && is_tax('study_tags') ) {
$query->set( 'post_parent', 0 );
}
}
Then in your taxonomy-study_tags.php
template, you can just use the loop. Pagination will work without doing anything else.
Related Posts:
- custom post type paging not working past page 3
- Paginated Taxonomy Term Archive including one post per term
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Custom taxonomy rewrite give pagination 404
- Custom post type and custom taxonomy 404 on page 2
- custom taxonomy pagination 404 error
- shortcode to show custom post types by category
- Pagination on a custom post type loop
- Query/list all terms and their custom post count
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Genesis filterable portfolio isotope [closed]
- wp_query check if integer exists in custom field’s array
- Wrong request query on cpt and tax
- Previous/Next Link by Meta Value in CPT
- Get custom taxonomies from multiple posts
- Search / Filter posts on Title/Content OR Tags
- Pagination on with query_posts in custom post type template
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom-Posttype & Custom Taxonomy WP_Query
- Custom loop with multiple taxonomy queries
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- How do I move/order posts with a tag to the end?
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Custom WP Query on custom meta and sort by multiple meta keys value
- Woocommerce search pagination not working
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- How can I made custom taxonomies relationship?
- What’s the WP way to load remaining custom posts?
- How do you paginate a query grouped by month?
- Custom taxonomies relationship
- Pagination issue on category.php using custom post type query
- How to have this permalink structure: post_type/postname/custom_inner_page
- Query Custom Post Type Taxonomy term with multiple parameters
- Custom Post Type Pagination Paginates Only in URL Structure
- First custom field value (out of several) displayed twice after query
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- WP_Query orderby and tax_query
- Querying Custom Post Type, ordering by Custom Taxonomy Pagination Not Working
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- can these 3 queries be re-written as 1 query?
- Advanced search form with filters for custom taxonomies
- pagination not working for category.php (custom post types in categories)
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- Retrieve custom post types by custom taxonomies with WP_Query
- Custom post type pagination 404
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- How to make WP_Query not to show irrelevant posts?
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- WordPress wp_query() basic question about args
- Custom WP_Query always respond with 200 status even when no entry
- Create an archive page for custom post type with custom taxonomy
- Can’t use pagination with custom taxonomy
- Using page slug in wp_query
- WP_Query() with custom post type and taxonomy — get all terms?
- Custom taxonomy wp_query woes.
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- Variable not working in WP_Query
- WP_query – Filter by tax_query and meta_query using multiple select
- Creating two loops based on different logic
- Wp Query with multiple custom tag(taxonomy) by get the terms
- Trouble with pagination
- Pagination 404 on Index with custom query
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- WP_Query parameter conflict
- previous_post_link in same taxonomy in custom post type
- how to get this tax_query working?
- Different options per post type in WP_Query
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- How to show all taxonomies within custom post type loop
- How to get the post terms from a child taxonomy
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- display posts of custom post type with custom taxonomy
- tax_query (if the terms are empty)
- How to list custom post types on a custom post type page?
- How to count other posts not having specific taxonomy terms?
- Exclude latest post from WP_Query taxonomy term loop
- Pagination for search results of custom post type [duplicate]
- How to query Posts from a custom post type which contains a custom taxonomy?
- Custom Post Type Archive Pagination
- Query Posts that have Custom Taxonomy
- List all Custom Post Type posts excluding certain Taxnomy term
- Get posts by category name
- Taxonomy rewrite pagination 404
- Foreach loop returning more than one item when querying taxonomy
- All blog posts are not showing up
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Query custom posts from custom taxonomy
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Query Custom Post Type by Taxonomy
- Display featured posts for a custom post type by taxonomy
- Single parent post lists child posts with pagination
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Custom post type pagination error
- Query for specific taxonomy that executes a particular loop depending on volume of posts?