Figured a simple pre_get_posts would do the trick,
It will, you just need to query posts that have a parent of 0.
Assuming your taxonomy slug/name is literally just region:
function wpse_286405_parents_only( $query ) {
if ( ! is_admin() && $query->is_tax( 'region' ) ) {
$query->set( 'post_parent', 0 );
}
}
add_action( 'pre_get_posts', 'wpse_286405_parents_only' );
Related Posts:
- Custom Post Type Archives by Date and Taxonomy
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- How to show term-specific post list, without posts associated with child terms?
- get_categories for custom post type and filter by custom taxonomy (brand) and list child categories of a defined category
- Category page only displaying the posts from a custom type
- How to list custom post types?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Get the taxonomy of a post hierarchically
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Custom Post type & Taxonomy 404
- Use the custom post type archive for taxonomies?
- How to constrain the results to a specific post_type on tag archive page?
- Custom post types not showing on the standard WordPress Category page
- Archive for custom taxonomy
- One of my headings is mysteriously coming up as a link in my CPT Archive
- How can I set up the URL for a category archive for a custom post type?
- Show custom category archive as front page and remove taxonomy slug from urls
- Taxonomy term archive claims there are no posts, but there are. How to resolve?
- Custom Taxonomy archive with url parameters
- Custom Taxonomy as checkbox or dropdown
- Custom Taxonomy as Dropdown in admin
- Multiple Paginations on one Page
- Page is defaulting to archive page and not designated template
- How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?
- WordPress custom post type category pagination 404 Error
- Query multiple taxonomy in Custom Post Type
- Custom Post Type: How to display all of same taxonomy?
- List all custom post type posts from a given category?
- Custom Post Type with static page for archive
- Exclude specific taxonomy term when using wp_get_post_terms
- Second Custom Post Type Archive
- Remove base slug in permalinks of hierarchical custom post type
- is_main_query() not working for WP REST API
- How can I move a custom taxonomy and its data from one post type to another?
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- Change or update WordPress loop based on dropdown selection
- Archive page for taxonomy terms
- How to get the parent of a non-hierarchical custom post type being edited in Gutenberg
- How can i change the output of posts_nav_link();
- Custom Post Type Set Comments ON by default without show METABOX
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- Full Custom Post Type List Organised by two Taxonomies
- Archive for CPT
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- How to organise this data within WordPress
- How can I get this request to use the Custom Post Type page template instead?
- How to Set Taxonomy Object Description?
- How can I use archive-{post_type}.php theme template?
- Taxonomy archive 404ing (not term archive)
- Variable not working in WP_Query
- Associate all Custom Post Types with Taxonomy
- Alphabetically sort a taxonomy.php template by post title
- Show Taxonomies with admin area for custom post type?
- Custom Post Type setup
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Need to have an archive widget which organizes and displays a custom post type using a custom date field
- pre_get_posts works in post type archive but not in single post
- Menu’s breaking, now showing all page links on site
- Query Custom Post Type by Taxonomy
- Copying over taxonomy structure from one CPT to another
- Sort Archive by Taxonomy
- Display ONE taxonomy and its assigned pages
- Page that lists publications by classifying them by taxonomy
- users post count
- Having hierarchies inside WordPress custom post type
- Filtering posts based on three taxonomies
- Display category filters for custom post type when category is shared by multiple post types
- How to order taxonomy terms by most recent post?
- editing shortcode for custom post type within a plugin
- How to display all terms from all taxonomies in post, but separately for each taxonomy?
- Custom Post Type archive page listing a 404 or single post
- List all posts associated under custom taxonomy
- Custom post type pagination problem – page 1 and 2 show same content
- The page or ad listing you are trying to reach no longer exists or has expired
- Custom post type category link + add to menu
- Single taxonomy for different custom post types
- Taxonomy and Custom Post type with Collpase
- I broke it! Custom post type archive gets redirected to home
- Display a Custom Post Type within another with hierarchically slug
- Best approach to allow front-end display of posts’ reviewers?
- Listing Custom Post Post from certain category
- Custom Post Type and Taxonomies, creating the corresponding template file and loop the data
- Custom Post Type parent slug as menu item
- Archive templates based on taxonomies
- Custom Post Type Child Pages
- Custom Post Types Archives and daily/monthly joke
- Hierarchy between post types
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- Query Custom Post Type and sort by year
- Custom post types not using archive structure
- Single and Archive Pages with Custom Post Type
- Sharing a custom taxonomy – No posts?
- show only one category posts in admin
- How do I assign the post parent?
- Is there a function that replace category name with a icon?
- Passing total post count to javascript
- How to determ a custom post type url?