I have run into the same issue. I believe the root cause is the order of execution. For the sake of experiment, I ran get_object_taxonomies()
immediately after register_taxonomy()
, in fact in the same function and it worked as expected. So what to do? Use add_action()
hook to execute get_object_taxonomies()
after register_taxonomy()
. The correct order of execution can be guaranteed via 3rd argument of add_action( ... int $priority = 10 ... )
Related Posts:
- How to Add Custom Taxonomy To Woocommerce Plugin
- How to completely disable a taxonomy archive on the frontend?
- register_taxonomy with multiple object type and update_count_callback
- Custom Taxonomy and tax_query Issue?
- How to List Thumbnails based on Custom Categories
- Custom Taxonomy Not Showing in Menu
- Set object terms not working on plugin activation
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Adding a custom post type taxonomy template in plugin
- How to add a custom taxonomy to show up in a custom post type menu?
- What is the best practice for displaying my plugin content in themes?
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Plugin fatal error
- Custom post type’s extra fields – how to handle?
- Main query not querying any posts in custom taxonomy template
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- Dynamically insert code to custom post type loop
- Show current custom taxonomy
- How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop
- Most viewed post of custom post type
- Writing a custom Glossary plugin
- Custom post type page with parameter
- Custom post type category link redirecting to 404 page
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- How to show Custom Post Types under Taxonomy in a new WordPress page template?
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- Error 404 change permalink term custom term taxonomy
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Changing CPT permalink
- I have a random letter appearing before my content. Where to start looking for the cause?
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- Insert custom taxonomy into category query
- % encoded URL giving 404 error in WordPress
- Which File Populating CPTs in Slug URL
- Not Able to List CPT Based on Taxonomy Term
- Facing some Issues on Two Parts Custom Post Type Taxonomy Names
- Associate custom categories to different user IDs
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Render custom taxonomy query as single template
- Custom Taxonomy Showing in WP Menu
- Get term_id for each instance of custom taxonomy
- How to internationalize the sub menu name “categories” in Custom post type?
- Issue on Adding Taxonomy to Custom Post Type Using Function
- Custom Post Type urls not working
- How to filter custom post data with AJAX?
- Make term slugs of custom taxonomy available in WP REST API for custom post type?
- Check if post type has term
- Custom taxonomy not showing up when adding a new custom post type
- query multiple taxonomies
- Create an archive page for custom taxonomies
- Rewrite permalinks for custom posttype and custom taxonomy
- How to check if last uri segment is a custom post type or taxonomy term?
- Sort the main query in subcategories/terms?
- Highlight nav menu terms
- Custom Post Types, Custom Taxonomies and Permalinks ?
- Trying to manage templates on a blog with lots of custom taxonomies
- How to register custom post types in a plugin?
- Display Custom Category (taxonomy) Name in Custom Post Type
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Issue with pre_get_posts on custom post type archive pages
- Custom Post Types relationships
- How can i skip same post from taxonomy term?
- Set menu active state for custom posttype and category, given custom taxonomy term
- Multiple portfolios and single item in two of them (ideas?)
- Pagination for Custom Taxonomy Page [duplicate]
- Display custom post type category, while in a CPT category, then the posts beneath
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Hide post navigation if current post is in a category with only one post
- I want to change the word “Tags” in WordPress to something else, but how?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Set post terms for multiple posts
- Display Registered Taxonomies
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Display custom posts randomly in custom taxonomy archive
- WP_Query parameter conflict
- How to get all posts related to particular category name on button click?
- Display custom posts for each category from its custom taxonomy
- Get custom category ID of current custom post within the loop
- Get newest created custom category (get_term_by and variables) (outside Loop)
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Displaying custom taxonomy menu in custom post type archive
- Create custom post type categories
- Add other all taxonomies as meta boxes to custom post type
- How to get post type archive category title
- Remove CPT Slug with 2 taxonomies and 1 post meta
- How to reset HTML filter input fields on CPT list page?
- Should I make a taxonomy to organize data like this?
- List all posts from custom post type by taxonomy
- changing post type in loop query
- Taxonomy and Rewrite Structure
- Pagination for a Custom Taxonomy
- Trying to create hierarchy between 3-4 custom post types
- Custom Post Type Base URL
- Only One Post of Custom Post Type Appearing on Template Page
- Limit taxonomy terms added to a custom post type
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes