• First off: I know, themes should be adding Custom Post Types at all, and instead leave that task to a plugin for better portability. In an ideal world, that’d be the norm. But this is far from ideal, and a lot of premium themes add Custom Post Types for stuff like portfolios, events, services, and so on.

    My question is, how should we go about naming our custom post types? WordPress is fairly clear that they should be unique so it won’t clash with plugins or the like. For example, naming your portfolio posts as ‘mytheme_portfolio’ instead of ‘portfolio’ would be good way of preventing conflicts.

    But what about when the user changes themes? The posts will be inevitably lost (I know there are tools to change their type, but that’s beside the point).

    For that reason, shouldn’t we be using more standarized names such as ‘service’ or ‘portfolio’ in order to make a change easier? This way, if somebody activates a different theme with this same CPT, (most) of the data will be preserved and ready to be used. Of course, this is assuming that other themes do this as well, but I’ve seen a fair number of them to go that way.

    I’d like to know your thoughts on this.

  • The topic ‘On Custom Post Type Naming for Portability’ is closed to new replies.