WordPress.org

Ready to get started?Download WordPress

Forums

Modify custom post type after it has been registered (3 posts)

  1. ragulka
    Member
    Posted 2 years ago #

    Is it somehow possible to modify a custom post type after it has been registered with register_post_type?

    The idea is that a plugin is adding a custom post type and I would like to turn in into a hierarchical post type, but I don't know how. I don't really want to hack the plugin file - I'm hoping there is a hook that I can use?

  2. dkotter
    Member
    Posted 2 years ago #

    It's pretty easy to change anything about a custom post type if you registered it yourself. If you used a plugin to do it, can't you just go to the plugins settings page and modify it there? I've only ever used a CPT plugin once before, but it allowed you to edit your post types as much as you wanted.

  3. psimatrix
    Member
    Posted 2 years ago #

    Was looking for a similar thing, depends on what you're trying to modify but here's a way to change what the post type supports.

    http://codex.wordpress.org/Function_Reference/add_post_type_support

    If the post type is created by a theme or plugin, it's better to modify it after it's registered in the event that the theme or plugin updates so that your settings will be retained.

Topic Closed

This topic has been closed to new replies.

About this Topic