The error message is pretty clear: Invalid taxonomy.
.
You’re hooking to init
to register your custom taxonomy, however you’re calling get_terms( 'type' )
right away, before init
is fired and therefore before your taxonomy is registered.
You can’t call get_terms( 'type' )
before init
.
Related Posts:
- array_pop() expects array, boolean given for $event_type_term ->slug
- Get all taxonomies for all post types
- How to output wordpress custom tags separated by comma?
- Commas not displaying in implode
- Add active class to foundation 6 tabs while looping categories
- Exclude Custom Post Type from shared Custom Taxonomy
- taxonomy terms array not working
- posting twice from an array?
- Get terms by taxonomy AND post_type
- Get Custom Taxonomy ID within loop
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- Retrieve single term slug
- How can I add programmatically custom taxonomy terms to a custom type post when saving posts?
- post count is wrong when using same taxonomy for 2 different CPT
- Glossary with Custom Post Type
- Categories under custom post types doesn’t show properly
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Separate Custom Post Type Taxonomy by Comma
- Sort the main query in subcategories/terms?
- Get child terms of current term of the current post
- Show ACF field from custom taxonomy and display on the single template
- How to get the first term for the current taxonomy?
- Output the content of a term organised by each of the CPT?
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- How to check the terms in single custom post type template
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- How do I display tags for a custom post type single page?
- using $wpdb to get custom post type with term
- Show posts from two or more custom taxonomy terms
- Allow user to set custom order to a list of custom taxonomies?
- Which post does a taxonomy term belongs to?
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- How do I require the specification of term in a custom post type and custom taxonomy?
- How to get custom posts sub category link
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- Query posts with double taxonomy
- Adding predefined terms to a taxonomy
- Custom query – get_the_terms not work
- How to Display Posts From Category Within a Custom Taxonomy?
- Control content before and after custom post type loop
- Different options per post type in WP_Query
- Creating a non-hierarchical Taxonomy that behaves like categories
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- how to count the current posts terms
- Urls in Custom Post Type work for Terms but not for its Taxonomies
- Custom Taxonomy Terms in Menu lead to which page?
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Foreach loop returning more than one item when querying taxonomy
- Compare Two Custom Post Types Using The Same Custom Taxonomy
- Using page title as a link to term archive
- Add custom post type taxonomy tag to article class
- Custom Taxonomy dont save in a frontend form for post a custom post
- Add filter to Admin list for all custom post types by their custom taxonomies
- Add the custom post term to the custom post title
- Custom taxonomy not saving correctly
- Setup page template array in a custom post type
- Taxonomy terms with the same name are updated between separate custom post types
- How do I ensure that post_type and Taxonomy use the same slug?
- Custom post type page with parameter
- How can I loop at a Specific Taxonomy from a custom post type?
- Change Dropdown jQuery to show/hide but with default place holder that shows all
- Custom archive page for custom taxonomy and pagination issue
- Add a class to a div if custom post type has specific terms?
- Get all post under custom post type grouped by custom filed value in custom taxonomy
- Check that a slug is present in the get_terms request
- Return multiples taxonomies with wp_get_object_terms
- Custom taxonomy terms hierarchical navigation
- Excluded Custom Taxonomy Term Posts Displaying in loop
- pagination problem listing custom post types of taxonomy in wordpress
- Show parent category and subcategory once in while loop
- Custom search for a custom post type in WordPress
- Saving Child Terms on front end not setting parent
- Show tags of custom post types in WordPress
- order taxonomy alphabetical
- Filter Term By Parent Term – Custom Post Type
- Display all Custom taxonomy terms and their relevant custom posts
- WordPress get all post with like in terms [duplicate]
- Show custom taxonomy not in submenu
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- How to Fix WordPress 500 Internal server error due to custom post type
- Best way to group posts based on custom post type terms
- Get list of CPT posts in *current* post’s taxonomy term
- WordPress custom field images not getting inserted into array
- How to retrieve the permalink for a specific (custom) term?
- Meta-Box to add multiple items one at a time and on publish save all
- Values inside a custom field to determine which category posts to display
- WordPress Custom Post Type and sort by Tags
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- Get a list of categories ids
- Looping taxonomy in taxonomy?
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- Custom Loop for custom post type. Compare by meta_value?
- get_the_term_list() wanting to loop through the returned values
- Get term link of shared taxonomy between multiple post types
- How to use wp_set_object_terms depending on page ID?