I’m working on a project that involves creating a custom theme for an existing site. The basic scope is to create a new theme and “apply it” to the new site, meaning get all the existing site content situated and looking good in the new theme. Sounds pretty straightforward, right? I mean, just create a handful of templates (front page, archive, single post, single page) and go to town. There’s no content restructuring – it’s just taking the existing posts, pages, etc., and making sure it looks good in the new theme. But here’s the problem: The previous developer registered several custom post types and included a bunch of custom fields and meta boxes in the theme. Why is that a problem? Well, it means that, once that theme is deactivated, those custom post types and meta data are completely inaccessible. Yes, the data is still in the database, but there is no admin interface to get to that data. In a moment of frustration, I tweeted a PSA to please not register custom post types in a theme, but instead use a custom plugin. All the old devs of the world sagely nodded their head and retweeted my tweet or responded with the nerd equivalent of AMEN. But then, another dev bravely asked why
Share This