Two themes, one set of data
-
Hi
I want two separate theme templates running on the same data, i.e. not just the same database but the same tables.
Preferably, I want users to be able to login once and manage data in one place.
I don’t mind if this uses a subdomain or not. A sub-domain might be preferable.Many ask why one would do this. In my case, it’s quite simple really. I need an area (subdomain?) which will be protected and only visible to admins, and will operate as my CRM. In other words, public users get to see certain meta of my data in their template files, and the ‘managers’ get to see (other meta of) the same data represented as reports using different templates.
The best way I can think of doing this is using multisite to register my CRM as a separate blog, crm.mydomain.com. I can therefore use WP’s built in template hierarchy and have 2x single-$posstype.php, one for each theme/subdomain. And, use switch_the_blog() in the template headers to access the data from Blog_1.
Another option is to install two instances of WordPress and alter the second one’s config to point to the original tables (i.e. both use wp_$tables), except for the $options table which needs to be separate;
A third option is to have a single installation and create custom page templates and select the template in the edit screen. According to what I’ve read, one used to be able to select custom templates for custom post types, as with pages, but this feature is not available anymore? This also may be tedious.
Or should I consider customizing the admin interface to deliver reports to my admins?
Is there a better way to achieve what I’m trying to do?
Otherwise, which of these options is recommended?
Thanks very much.
- The topic ‘Two themes, one set of data’ is closed to new replies.