You have to register the taxonomy before you can add terms to a post type. Register the taxonomy after you register the custom post type. If you are not the one that is registering the post type, you will need to find where it is being registered and make sure you register the taxonomy afterwards. After both those are registered you can add terms to posts using wp_set_object_terms
.
Related Posts:
- get_terms return errors
- Fast way to add countries as a custom taxonomy term?
- Is there a filter hook that I can use to change how taxonomy term names are displayed?
- Get Custom Taxonomy Terms by Date
- Display all subterms of a custom taxonomy filtered by parent terms
- Post filter with multiple checkbox taxonomy terms
- Custom terms in custom category taxonomy
- How can I create a taxonomy meta-box with search suggestions but no new terms input?
- Make Custom Metaboxes Collapse by Default
- Check for and enforce unique value in user-entered custom meta field in WP Admin
- How can I select a primary category?
- Custom taxonomy: same terms, but for different years
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- Reproducing hierarchical list output from wp_list_categories(), using get_categories()
- How to Register and Display Widget for Custom taxonomy
- Add ‘Right Now’ widget to custom dashboard
- Using Custom Posts with Metaboxes and Drop-downs
- Show Custom Taxonomy Slug(s)?
- Custom Taxonomy Archive not displaying entries
- Exclude custom taxonomy tag from loop
- Adding action to save_post, post needs to be saved twice for function to work
- Hide custom field if empty
- Filter posts by custom taxonomy terms
- Function to remove archive sidebar for custom taxonomy?
- The Best Way to always load the newest version of 3rd party code
- Set terms in a custom post
- Get posts of ONE taxonomy term of custom post type
- I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box
- Automatically check parents (in a taxonomy) when child is selected
- How to add textarea field to taxonomy (tag)?
- Custom Status of Custom Post type need to EXCLUDE from Taxonomy pages
- custom meta box for page default template
- How can I get the custom post type assigned to a current custom taxonomy for query?
- wp_query get post custom taxonomy in search.php
- How to get every custom taxonomy names and urls?
- Display specific Taxonomy Term from Custom Post Type
- Data won’t save if metabox within conditional in admin. What am I missing?
- input radio ‘checked’ saves, but select option ‘selected’ doesn’t
- Semi complicated custom taxonomy question
- Get wordpress taxonomy slug name(s) to use as div class
- How do I list custom taxonomy terms with the links?
- Let author add field to metabox by pressing a button
- Meta Tags by Meta Box
- Showing Meta Box via Jquery Checkbox
- problem saving/ retrieving custom meta with wp alchemy metabox
- Echo the Last Child Taxonomy only (not parents)?
- How to query term_id of a Custom Taxonomy by name
- WordPress 3.1.2 Bug: add_theme_support() and video post format registering twice
- Use wp_list_categories to list parent categories from actual term
- How to show parent taxonomy using get_the_terms?
- wp_insert_post custom taxonomy multiple Category not added
- query variables for custom taxonomies
- Select input in metabox not updated
- If Term Name Exists, Append a Unique ID to Slug
- Multiple header style under meta box
- My list of terms of custom taxonomy displays 7 times
- Display Custom Taxonomy Name As A Shortcode
- Taxonomy template is not reading
- Adding a drop-down (select tag) option under Menu Settings in WordPress Admin
- URL issue after setting up Custom Structure in Settings >> Permalinks
- How to assign a default/priority taxonomy to be shown in url in case two taxonomy items are selected
- Change meta-box title- “LearnDash Quiz Settings” to “Quiz Settings”
- Embedded Options in a Custom Metabox
- duplicate featured image functionality in custom meta box
- Combine Categories & Custom Taxonomy
- Custom dropdown search form that allows users to select option B based from Option 1
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- after checked the checkbox in backend, dont show social link on frontend
- Change post template the proper way
- Taxonomy template by post type
- How to loop through 1 CPT with 2 Taxonomies
- How to setup a taxonomy that can have only one post assigned to it?
- Make Terms Under Custom Taxonomy Use Specific Single.php Template
- Grouped custom taxonomy query
- Get a different size of Image thumbnail while working with custom metabox
- Delete Term via edit-tags.php
- Need Advice to Working with Custom Post Meta
- Create advanced portal website with sections – taxonomy usage?
- Custom Query for Taxonomy
- Adding a third custom taxonomies
- Taxonomy question how to add more data
- How to get a custom taxonomy slug in body classes
- How can i create menu like in the example?
- wordpress shortcode not working
- Remove welcome panel from contact form 7 page [closed]
- Create alphabetical Pagination for custom taxonomy?
- WordPress Code Snippet to count total posts by author
- List Top 5 taxonomy terms based on number of post
- How to remove admin menu pages inserted by plugins and themes in the top admin bar?
- WordPress custom dropdown listings
- Can ‘edit_form_after_editor’ messages be varied for specific pages?
- Customizer – How to get theme mod range value?
- Custom login and registration forms
- MetaBox not saving after empty
- Remove header title form page through CSS [closed]
- How to show taxonomy terms from wordpress database?
- Save Textarea on WordPress Frontend
- How to display page ids as page slug names?
- How to custom post navigation
- Custom Tags Archive – permalinks not working