You don’t need to return $query
it is passed by reference.Have a look at the codex
The return
statement might be shortcircuiting the page load. Try removing it.
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?
- 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?
- Hierarchical Custom Post Types – Show only parent on tax archive?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Use the custom post type archive for taxonomies?
- How to constrain the results to a specific post_type on tag archive 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
- 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
- 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 Post type & Taxonomy 404
- 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?
- 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_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?
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- WordPress multisite – is it possible to have different taxonomies for each site?
- Get assigned post categories
- My custom taxonomy is only displaying 1 of 3 terms
- Query custom post types & Taxonomies and list them in a table on a page
- Custom Post Type setup
- Archive Page for Multiple Custom Post Types
- Taxonomy template page not working
- Default Category Page not showing custom post type which has taxonomy category
- Can’t access private custom posttype single- or archives-page
- Custom taxonomy template shows 404 Error