Add tag selection to custom post type

Adding this wordpress snippet to the functions.php will enable tag selection within the editor for that custom post type. Don’t forget to change the CUSTOM_POST_TYPE to the name of the custom post type you created.

function reg_tag() {
	 register_taxonomy_for_object_type('post_tag', 'CUSTOM_POST_TYPE');
add_action('init', 'reg_tag');

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!