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
- Get custom post type slug for an archive page
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to limit the number of terms (terms acts like categories)
- Custom Post Type – Taxonomy Dropdown Menu?
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Taxonomy term in permalink
- Custom Post Type Archives by Date with Custom Permalink
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- How would I leverage custom Taxonomies in this scenario?
- Group list of posts by taxonomy and allow for pagination
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Regex problem in an add_rewrite_rule
- Disable WordPress Recognizing Path as Attachment
- Change plugin’s has_archive = true to false?
- How to show multiple post types on taxonomy archive?
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Slug for standard post post_type
- How do I display custom post types through a common taxonomy?
- Paginate_links won’t create the right links on a taxonomy filtered custom post type archive
- WordPress custom post type archive with description
- Get post type from taxonomy or category page
- Assign Taxonomy Based on Custom Field Value
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- How to filter out post type meta?
- custom taxonomy archive by year
- Change name of custom post type archive
- When ‘is_post_type_archive()’ return true?
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- Query Multiple Taxominies Across Multiple Post type’s
- CPT Archive with core Category
- Update permalinks when new category added to custom post type taxonomy
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- Taxonomy custom post type URL
- Custom post taxonomies as tax_query terms?
- WordPress showing archive.php instead page
- How do I display the taxonomy for a custom post type in an array
- Suggested Post and Taxonomy structure
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- Review site custom post type structure
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Linking from CPT page to taxonomy.php
- Page not found for custom post type UI plugin and taxonomy
- Filter second dropdown (tax) based on first dropdown (cpt)
- Assign CPT archive page attributes
- How can I create an automatic drop down menu with my tags?
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Default Category Page not showing custom post type which has taxonomy category
- Custom taxonomy template shows 404 Error
- Display Date & Author Info on Custom Post Type Archive Page
- Custom Post Type API doesn’t show taxonomy or category array
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Creating custom post type posts and associating them with a post from another custom post type
- Custom Post Type with modified permalink structure results in 404
- Problems making shortcode with custom post types and taxonomy
- How to prevent a custom post type from using the archive.php template?
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Event Archive by Month
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- How to use taxonomy term as permalink folder
- automatically select taxonomy based on post meta
- Display related CPT with custom taxonomy
- Custom permalink structure for custom post types including multiple taxonomy
- Custom Post type page content (archive page)
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- Group custom post type posts by month
- Creating an archive page or simple template to list all values of a custom field of specific post type listing
- Tell wordpress to show a single page instead of an archive page
- Custom category taxonomy – archive page not showing up
- Wrap an X amount of taxonomy posts in a separate Row in WordPress
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Rewriting archive page slug to be different than custom post type slug
- Site loads very slow for archive custom post type page
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Custom Search not working
- Custom post type post taxonomies
- Problems with custom post type and hierarchical permalinks
- Is it possible to remove the word “date” from archives?
- Structure of custom post type / taxonomy?
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- Is there a function that replace category name with a icon?
- How can I rename custom taxonomy if multiple custom post type have the same taxonomy name?