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?
- Separate archive template to show posts and CPT by same category/taxonomy
- Custom Taxonomy archive with url parameters
- Taxonomy in URL
- How to organise this data within WordPress
- Organize WordPress site, so it can maintain with huge database
- Custom post type Permalinks with hierarchical Taxonomies
- Review site custom post type structure
- How can I get this request to use the Custom Post Type page template instead?
- Filter get_cat_id for Custom Post Type
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Different Category system needed for the Custom Post Type
- Custom post type posts don’t show in archive widget
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Archive for a Taxonomy of a Custom Post type
- Output terms for custom post types
- Linking from CPT page to taxonomy.php
- Page not found for custom post type UI plugin and taxonomy
- Unable to link categories to custom post type using standard function
- How to Set Taxonomy Object Description?
- Categories and tags for custom post types
- Archive not sorting correctly
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Enable taxonomies by post type in an array of CPTs
- What’s the name of the custom post type yearly archive template?
- How to assign tag to custom post type in wordpress?
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Rename a slug label
- how to remove pages loading with the archive templates
- Archieve.php not loading for custom post type
- multiple custom post type on category page
- Custom Taxonomy Category link
- Get Post Terms of Current Post (selected taxonomy term) – How to get only the taxonomy value and not “Array ( [0] => taxonomy term )” in the frontend?
- How to get all Custom Post Type Filtered by one Specific Taxonomy Term
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- How does the ‘the_post_navigation()’ work for CPT’s?
- Is it safe to change a Custom Post Type from “hierarchical:false” to “hierarchical:true”?
- How can I use archive-{post_type}.php theme template?
- Custom post type – list posts based on meta_key and display them divided by CPT taxonomy category
- Custom taxonomy (categories) on custom post type return no results
- Filter second dropdown (tax) based on first dropdown (cpt)
- Taxonomy archive 404ing (not term archive)
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- Return the name of the post type
- Archive-posttype.php isn’t loaded
- get parent content inside child posts
- page template for custom post type
- get_category_link() for custom post type does not include custom slug rewrite?
- Add tags to custom post type without menu link
- Targeting categories in custom fields
- Assign CPT archive page attributes
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- How can I create an automatic drop down menu with my tags?
- Associate all Custom Post Types with Taxonomy
- How to define a term for custom taxonomy
- Custom taxonomy or custom page templates?
- Invalid Taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Dynamically insert an article at the top of a taxonomy archive – or?
- Need help deciding on a taxonomy
- Alphabetically sort a taxonomy.php template by post title
- Archiving custom post content?
- archive as a page, so that it can be added in the wp_menu_nav
- Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Get Posts by Category, Tag , and CPT Taxonomy
- How do I add custom HTML to the content of an archive page’s posts?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Show Taxonomies with admin area for custom post type?
- Archive links for custom post types
- Show All Custom Post Types On A Single Archive Page
- Custom taxonomy template list not working (404)
- Pagination hitting 404 page on /page/4
- Remove categories taxonomy from custom post type
- Rewrite custom post type with taxonomy
- Topic won’t save for a custom post type — how to debug?