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 Posts by Custom Post Type ,Taxonomy, and Term
- Get The Post Type A Taxonomy Is Attached To
- Display current taxonomy term when inside custom post type
- Get term slug of current post
- How to limit the number of terms (terms acts like categories)
- Get Custom Taxonomy ID within loop
- How do I list custom taxonomy terms without the links?
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- Get terms that contain posts that in turn belong to other terms?
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Get custom post type by category in a page template
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- wp_get_object_terms(): count relative to passed IDs?
- Retrieve single term slug
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- 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
- Custom Post Type Archive Template
- Maintaining strict one-to-one association between terms and custom posts
- Displaying custom post type by first letter through custom taxonomy
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- If on term-page -> get the current term?
- Ajax filter with custom taxonomies
- Filter posts with ajax form and checkboxes
- Separate Custom Post Type Taxonomy by Comma
- Sort the main query in subcategories/terms?
- Trouble adding custom featured image for custom taxonomy TERMS
- Get child terms of current term of the current post
- How to get only one category of custom post type?
- Get list of terms of current taxonomy archive for another taxonomy
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- How to get posts from multiple custom post types according to it’s custom taxonomy terms?
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- How to check the terms in single custom post type template
- Weird problem happening with custom taxonmy when creating/updating posts
- Displaying a custom post types custom taxonomy value?
- get_the_terms return only last term
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Does WordPress limit the length of slug names for Post Meta or Terms?
- get_post_meta returns empty array for terms
- How to display selected taxonomies by their parent
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Custom Field Order by Last Name and First Name
- get_posts of Custom Post Type AND Custom Taxonomy
- Update post terms with custom taxonomy
- How do I display tags for a custom post type single page?
- Custom Post Type Archive Page Filtering
- Received nothing after executing AJAX post function
- Filtering WP_Query Dynamically on the Front-End
- Get template part using a custom taxonomy term
- Get posts by querying taxonomy and certain terms of the taxonomy?
- How to restrict users and admin from creating new taxonomy terms?
- Get custom post type list for every category shortcode
- 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?
- Displaying custom taxonomy in the admin list of a custom post type
- Which post does a taxonomy term belongs to?
- Display post as term id
- 404 error when navigating to a taxonomy page with Cyrillic, what’s wrong?
- How do I display the taxonomy term alongside the post type post title?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- Post count by month of taxonmy term
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- Categorize custom post type
- How do I display the taxonomy for a custom post type in an array
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- Display Custom Taxonomy Alphabetically
- How do I require the specification of term in a custom post type and custom taxonomy?
- Custom Post, set object Taxonomy terms in plugin
- Display post content with respect to its title?
- Get terms that contain posts that in turn belong to other terms?
- How to get custom posts sub category link
- Custom while loop for hierarchical display of a taxonomy
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- Display taxonomy terms, child terms and posts in a template
- Foreach inside shortcode not working as planned
- Use custom walker to add taxonomy terms to main nav menu
- Add term to custom post type on draft
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- Listing all term items alphabetically / sorting loop
- Different Category system needed for the Custom Post Type
- How to get WordPress term attached to the Post?
- Query posts with double taxonomy
- Adding predefined terms to a taxonomy
- Get term name without a foreach loop