Hey how do I showcase my themes like WooThemes has done. I don't want to use multiple databases and Wordpress installations? Can you suggest me any reliable solution which lets me use the same database for all themes.
Thanks
Hey how do I showcase my themes like WooThemes has done. I don't want to use multiple databases and Wordpress installations? Can you suggest me any reliable solution which lets me use the same database for all themes.
Thanks
If all the themes use the same CSS setup (what I mean by that is all the id's and classes that you use for styling are the same in all the themes) then you could simple have a drop down menu with this
JavaScript function:
function themeChange(selection)
{
window.location = "viewtemplate.php?theme=" + selection;
}
And with this HTML:
<select onchange="themeChange(this.options[this.selectedIndex].value)">
<option value="0" selected="selected">Select Theme</option>
<option value="1">Theme 1</option>
<option value="2">Theme 2</option>
</select>
Once the page loads you can use PHP to retrieve the theme selection value and then inject the correct CSS style sheet for that theme.
PHP:
<?php
$theme = $_GET['theme'];
if ($theme == 1)
{
?>
<link rel="stylesheet" type="text/css" href="theme1.css">
<?php
}
else if ($theme == 2)
{
?>
<link rel="stylesheet" type="text/css" href="theme2.css">
<?php
}
?>
Hope that helps :)
Thanks