You need to register the post_tag
taxonomy for the post type.
For a quick, after the fact, way to do this (meaning the CPT has already been registered, etc.), you can use register_taxonomy_for_object_type()
.
A workable example is below. Edit the value for $object_type
, and place the example below in the functions.php of your child theme:
add_action( 'init', 'my_cpt_has_tags_now' );
function my_cpt_has_tags_now() {
$taxonomy = "post_tag";
$object_type = "name_of_your_cpt";
register_taxonomy_for_object_type( $taxonomy, $object_type );
}
Related Posts:
- Difference Between Filter and Action Hooks?
- Explanation of the “posts_join” and “posts_fields” filter hooks?
- How do you use the plugin boilerplate loader class to hook actions and filters?
- How do I Make a Theme “plugin-ready”?
- How to modify post content before writing to database?
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Is it possible to create an action hook using do_action() within add_action()?
- Hook for post permalink update
- Dynamically Override Fancy Title
- Define a function outside a class and call the function using action or filter hook
- Woocommerce – Hide a Column in Cart Table
- WordPress after content Hook & external template part
- Namespaced action and filter tags
- best practice for query string values – get_query_var always empty for my value supplied in query string
- get_current_screen() return null
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- WordPress custom taxonomy check box to dropdown
- How to get all queries’s results after they have executed?
- Remove an action by extending class and replacing it
- hook filter after the_content on a specific page
- Bind a function with its own argument to show something dynamically after every content
- Hook add_attachment error
- Call to undefined function is_home() or any conditional tags
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- Update variable value via add_filter
- Configure WordPress to Generate Scheme-less Relative URLs
- How to find list of all functions bind to a particular hook from my plugin?
- apply_filters() and call_user_func() to define and call a function outside a class
- Limit get_next_post to posts from the same author
- Any way, hook to add content right before the “read more” link?
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- Add_action not calling callback function
- How do I replace title with my plugin?
- Apply function on all action hooks?
- Ninja Forms: Front-End Forms, Post ID?
- How many times will this code run? (or, how rich is grandma?)
- add_action hook for completely new post?
- How to add sub-menu to a menu generated by wp_nav_menu by using plugin
- WordPress Hook for user register
- Using filters and actions for plugin API?
- Edit plugin without hooks in functions.php
- Is it possible to remove next-post / previous-post with out creating a custom template?
- Proper way to use apply_filters() with class functions?
- Actions or filters fired when data is saved in a custom table
- Determine which theme location a wp_get_nav_menu_items is for
- Conditional add_filter?
- How to check if certain plugin exists and in expected version
- Calling apply_filters on non-documented hooks
- Pass A Value From Outside To A Plugin Variable
- What function to hook for changes made in status and visibility of a post
- Order of Operation for these three hooks
- merging an array to an existing array using add_filter
- Modifying values with add_action to be sent to db
- save_post hook not triggered in WP v3.6.1
- Hook into theme-switching later than `setup_theme`
- Is it possible to delay execution of shortcode output callback?
- Hook to get image filename when it is uploaded
- How to display a message about updates in the plugin list
- Why my database table not created on activation?
- Act on user meta updated, but only once
- Is there any way to allow a plugin to write over a previous version?
- Execute Hook on the footer or header after activating a plugin
- How to call function at the bottom of post using plugin?
- how to add custom functionality after woocommerce place order button
- Problems with: manage_${post_type}_posts_columns
- Add code inside specific wordpress standard function
- Conditional hook based on the core function that is calling it
- How to filter the_content() & include content from template
- Send push when new post is published in a certain category
- use of do_action() without any functions attached
- Odd map_meta_cap $args on post edit — sometimes integer, sometimes string
- How can I create a custom plugin that allows anonymous users to signup without registering?
- What’s the hook for filtering every texts of site?
- Associate multiple email addresses with the same user account, so they can log in with either
- Custom filter not working
- hook update_option/updated_option empty $old_value and $value
- Make wordpress join default user metas with a column from another table while displaying the wp_users table on the users screen
- Gravity Forms Anchor only on Front Page?
- Can / should a widget plugin define its own Widget Area?
- add_filter postbox_classes multiple post types
- Override category archive page title (not the head title)
- Override woocommerce loop-start.php from theme using plugin?
- using filter and hook inside class
- Problem in plugin debuging in wordpress
- OOP development and hooks
- I have a plugin where in I have to change the title of the page dynamically by sending parameter to the_title filter
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- add_option_{$option} action hook not being called
- Function not working on any file other than the main plugin file
- Caption Shortcode: what filter to change the image size?
- Hook for plugin to show content for certain urls
- Multi hook deploiement
- How can I set a dynamic value for post_updated_messages based on return value of post_updated?
- What is the use of wp_schedule_event hook?
- wp_mail_from not changing from address
- append code after the_content not working
- Insert plugin html content to a specific spot in the frontpage
- get_term_by() returning null on plugin
- Execute callback after REST API request completes + Response is sent