2

I've been searching for a while for an answer to this, but the results I find always deal with custom post types as opposed to the built-in 'post' post type.

I want to remove the default 'Post Tags' taxonomy from the built-in 'post' post type and then add my own custom taxonomy to replace it. Essentially, I have other custom post types using my custom taxonomy and I'd like to align the 'post' post type with them.

I can't for the life of me figure out how to edit the default post type though, any ideas how I would do this?

Thanks in advance.

1 Answer 1

6

to completely remove post tags: https://stackoverflow.com/a/8363082

if you want to remove post tags from posts, but keep on other custom post types:

add_action( 'init', 'my_register_post_tags' );

function my_register_post_tags() {
    register_taxonomy( 'post_tag', array( 'my_post_type_here' ) );
}

to add your own custom taxonomy to posts, use register_taxonomy, setting the $object_type parameter to post.

3
  • Maybe I'm wrong but it seems to me like the link you provided will remove post_tag from ALL post types (default & custom). I want to remove it from default only, and still have it available for other custom post types. Is that possible?
    – user5710
    Commented Mar 27, 2013 at 22:16
  • i've updated my answer to show this, you just pass in the names of the CPTs you wish to add post_tags to in the array. Commented Mar 27, 2013 at 22:28
  • Worked like a charm, thanks. Seems so simple now but I just couldn't wrap my head around it.
    – user5710
    Commented Mar 28, 2013 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.