WordPress.org

Ready to get started?Download WordPress

Forums

Using Multiple Themes (6 posts)

  1. lagor
    Member
    Posted 5 years ago #

    I can't find it, so I'm posting here...

    Can I use multiple Themes in a single WordPress?
    If so.., how?

    Not templates.., but Themes.
    Like having Themes X on page 1 and Theme Y on page 2.

    Thanks in advance...

    Cheers, Rogier

  2. moshu
    Member
    Posted 5 years ago #

    In that way you can not.

    You can have multiple themes installed and give visitors an option to chose one with a plugin like theme switcher, but that also applies to the whole blog not to pages.

  3. alanft
    Member
    Posted 5 years ago #

    don't know if this helps...

    i adapted an old theme switcher plugin to switch themese based on grep matches to URLs with this code:

    $match_URI = array
    (	'\/info'	=>		'theme_X',
    );
    
    foreach ($match_URI as $pattern => $theme_switch)
    {	if (preg_match('/'.$pattern.'/', $_SERVER['REQUEST_URI']))
    	{	$smart_theme_switch=$theme_switch;	}
    }
    
    if($smart_theme_switch && file_exists(get_theme_root() . "/$smart_theme_switch"))
    {	add_filter('template','use_smart_theme_switch');
    	add_filter('stylesheet','use_smart_theme_switch');
    }
    
    function use_smart_theme_switch($value)
    {	global $smart_theme_switch;
    	return $smart_theme_switch;
    }

    you fill the $march_URI array with grep matches to the URL and the theme name to switch to. obviously it's no use in a theme's functions.php - so you have to make it into a plugin

  4. lagor
    Member
    Posted 5 years ago #

    Thanks people...

    I reconed it could not be done.., at least not in an easy way.
    As far as the code goes, alafnt.., thanks, but I'm not a coder (although I wish I was).
    I'll save the info for a later date, see if I can firgure it out...

    Thanks again...

    cheers

  5. mijk
    Member
    Posted 5 years ago #

    ...I'm not a coder...

    I have found another solution - a plugin.
    I dunno about using different themes on static pages, but - to use different themes in different categories and posts from this categories, you can use this cool plugin - Themed Categories works on WP 2.3 - 2.6 :)

    How to Use
    To use it, simply go to Manage->Categories, edit the category you wish to assign a theme to, select the theme from the “Select category themed” dropdown, and save it.

  6. gijs
    Member
    Posted 5 years ago #

    Link doesn't work anymore, but here is the updated version, working for WP 2.6, 2.7
    http://get-your-stuff.com/gys-themed-categories-20.html

Topic Closed

This topic has been closed to new replies.

About this Topic