Support » Themes and Templates » [Resolved] Category Specific Theme

[Resolved] Category Specific Theme

  • Say I was to have the theme ‘Magazine’ for my site.
    But for the category ‘Development (#1)’ (category-1.php), I wanted to use the theme ‘Developer’.
    Would it be ok to insert the code:
    {$template = 'Development';}
    in to the file to change it?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Might review this:

    You do realize you could use totally different headers/footer/sidebars without resorting to a different theme?

    I would like to resort to using a different theme though :L

    And who wouldn’t? Your idea for a category-specific theme option seems like a basic feature missing in WordPress–at least it is not easy to do. If you get an answer, can you let us know?

    Oops, I see you already got your answer:
    Thanks to Mike Lopez.

    Hi I am looking for a plugin that will allow special formatting of the posts on category view. For example http://wiki4android.com/blog/category/games/ the category page has special formatting, but when you actually read the individual posts the format is different: http://wiki4android.com/blog/games/action/icommando/
    What kind of plugin do I use?

    the plugin is not working fine .. i have developed a similar plugin page specific theme has the same problem .. can anyone help to find whats wrong ?
    see below listing for my plugin code

    Plugin Name: ThemeSelect_OOPS_NEW
    Plugin URI:
    Description: This will allow admin chose a theme for a new page
    Version: 0.0.1
    Author URI:
    License: GPL
    class ThemeSelect
    	function ThemeSelect()
    		add_filter('template', array(&$this,'get_post_template'));
    		add_filter('stylesheet', array(&$this,'get_post_stylesheet'));
    	function add_theme_box() /* Adds a custom field to set theme */
    	if( function_exists( 'add_meta_box' ))
    		add_meta_box( 'theme', 'Select Theme',array(&$this, 'show_theme_selector'),'page','normal', 'high');
    	function show_theme_selector($post)  /* Loads the select menu for the theme selector*/
    		echo "<select name=\"thm\">";
    		foreach($themes as $theme)
    		{ ?>
    			<option value="<?php echo $theme['Name']; ?>" <?php if($default_theme==$theme['Name']) echo "selected=\"selected\""; ?>> <?php echo $theme['Title']; ?> </option>
    	<?php   }
    		echo "</select>";
    	function save_theme($postid)
    			$themedata = $_POST['thm'];
    			//if(get_post_meta($postid,'theme', true)=="")
    			//	add_post_meta($postid,'theme',$themedata);
    		//	else
    		//	{
    		//	}
    function get_post_template($template='')
    	global $post;
    	$sel_theme = get_post_meta($post->ID, 'theme', true);
    		$template = stripslashes($theme['Template']);
    	return $template;
     function get_post_stylesheet($stylesheet='')
     	global $post;
     	$sel_theme = get_post_meta($post->ID, 'theme', true);
     		$stylesheet = stripslashes($theme['Stylesheet']);
     	return $stylesheet;
    $theme_select=new ThemeSelect();

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Category Specific Theme’ is closed to new replies.
Skip to toolbar