• chaloum

    (@chaloum)


    Hi
    the site I inherited had a CCT hard coded into the theme and I wanted to remove so as to align all the CTTs using one method.

    I removed all reference to the CCT creation in the Functions.php file and purged the orphaned posts using CCTM, But I cant re-create the CCT using CCTM and I get the message, the name XXXX is already in use.

    What do I need to do to clean the system so i can re-create the content type?

    thanks

    http://wordpress.org/extend/plugins/custom-content-type-manager/

Viewing 1 replies (of 1 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)

    Good question… this is why I hate WordPress’ architecture and especially it’s so-called “themes” which tend to be plugins in disguise. If the theme is in fact registering a post-type, then you can’t use the CCTM (or any other plugin) to re-register it because it’s already registered. The CCTM doesn’t care if there are posts in the database that use a given post-type — that’s just a matter of housekeeping that’s left to you. Look for any instance of the register_post_type() function in your theme or other plugins and see if you can spot some place where that name is being used. You should be able to see a “foreign post type” if you have that option enabled (i.e. a post-type registered by some other plugin). And just to be certain, are you 110% sure you didn’t perhaps inadvertently create this post-type already using the CCTM? Post type names are evaluated as lowercase so nAMe = NaMe = NAME.

    Another hang-up might be if you have a taxonomy that is using the same name. The WP core devs seem to be confused as to the architecture, and sometimes it seems like the distinctions between a post-type and a taxonomy are blurry depending on which part of the code base you’re looking at. You cannot create a post-type that uses the same name as a taxonomy, so perhaps you need to un-register a taxonomy too? Look for any instances of the register_taxonomy() function.

    If you need to test this to help isolate the source of the conflict, you may wish to deactivate plugins one by one or try temporarily using a different theme.

Viewing 1 replies (of 1 total)
  • The topic ‘cant create a CCT as the name is already in use.’ is closed to new replies.