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
- $wp_query->queried_object->ID throws warning: Undefined property
- The Operator “NOT IN” Does Not Work In tax_query
- Related posts by author pagination not working on the production site
- Secondary loop pagination on custom post type single post gets redirected to first page
- How to get_queried_object on multiple objects?
- Pagination throws 404
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- How to get the parent’s taxonomy?
- Querying Posts by Taxonomy From Alternate Network Site
- Help with hierarchical custom taxonomies and permalinks…almost there
- Custom Taxonomy archive returns 404
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- WP_Query pagination using only numbers instead of /page/1 on URL
- Query for posts in 2 taxonomies
- Custom Post Type Pagination & duplicate posts
- Optimised Code for Pulling Taxonomy Posts
- WP_Query search posts by custom post type and custom taxonomy
- Custom Post Type Loop within Shortcode
- Fetch taxonomies by custom post type id array
- Repeating posts when paginating random posts
- How to add pagination to wp_query [duplicate]
- Display CPT posts based on specific taxonomy
- shortcode to show custom post types by category
- 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?
- Genesis filterable portfolio isotope [closed]
- Get custom taxonomies from multiple posts
- 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?
- Custom WP Query on custom meta and sort by multiple meta keys value
- Woocommerce search pagination not working
- How can I made custom taxonomies relationship?
- Custom taxonomies relationship
- Pagination issue on category.php using custom post type query
- 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
- can these 3 queries be re-written as 1 query?
- How to make WP_Query not to show irrelevant posts?
- WordPress wp_query() basic question about args
- Create an archive page for custom post type with custom taxonomy
- Pagination doesn’t function properly for archive of a custom post type set as the front page
- WP_query – Filter by tax_query and meta_query using multiple select
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- how to get this tax_query working?
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- How to get the post terms from a child taxonomy
- display posts of custom post type with custom taxonomy
- tax_query (if the terms are empty)
- 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]
- Get posts by category name
- 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 for specific taxonomy that executes a particular loop depending on volume of posts?
- Pagination in custom post type archive.php not working
- set object terms after some some time of published post – functions.php
- Sort custom posts by date and then by taxonomy
- display post count in archive page that have relation with another taxonomy term
- How to search through all child taxonomies using WP_Query?
- Numeric pagination custom post type
- Remove custom taxonamy slug with pagination
- Problems in paginate_links with custom query loop and MB-Relationships
- WordPress custom post type taxonomy paging
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- WP_query sort by taxonomy
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- CPT/Taxonomy/Postname permalink structure makes pagination break
- Pagination not working (page/2 retunring 404 page)
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Get posts of an specific term of a custom taxonomy
- Pods pagination erases my sub menu
- Custom Post Type shows pagination (w/404) or posts_per_page query, but not both
- Custom post type and custom taxonomies display
- WP_Query for CPT with filter by another WP_Query
- How to pass taxonomy terms to WP_Query along with $args?
- WordPress custom post type
- Custom Taxonomy Query by Taxonomny not working
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- query and paginate multiple post types
- Paginate custom taxonomy category with wp_custom_pagination
- Storing/querying custom date data
- WP Query Post Type with same Taxonomy name
- Paged within a custom content type template [duplicate]
- Fourth page of custom post type archive page does not exist
- See the process of creating a taxonomy and tell me where I made a mistake
- the_post_navigation in single page with multiple taxonomies
- WP Query Conditionally query meta and taxonomy
- WP Query – Can’t get posts with specific taxonomy