Support » Themes and Templates » 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, 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there…. sorry i dont have the answer but i am looking for it too… i started researching, and found out how to duplicate the wp_options table, but the config is setup differently now, so the original steps dont work… i started making a blog post about it ( but one step is no longer valid as that file has changed… i found what seems to be a link to the options file in the wp-dp.php file but im scared to change it and break my site. anyway hope this helps… and i hope someone knowledgeable comes and saves us… all i want is multiple themes on a wordpress site… shouldnt be so hard….

    Hi Ahimsalove
    Yes, there are no such settings in the wp-settings.php file. It would be a useful solution to simply be able to point the site to the same tables but I’m not sure if it’s possible, I do not know the WordPress core adequately.
    I have also decided on a multisite install so that solution would not work for me anyway. I am however still looking for advice on this query, just now specifically within a multisite environment.
    I will post here if I find anything useful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Two themes, one set of data’ is closed to new replies.