• roburdick

    (@roburdick)


    Hello,

    I am trying to set up a category for my portfolio posts which I want to style differently.

    I have tried using category templates method described here:
    http://gabediaz.com/blog/custom-category-page-and-post-templates-for-wordpress/

    Nothing seems to happen. I would be happy to just use a style sheet, but cant’t seem to make that work either. Here is my code in the functions .php to assing different style sheets:


    // PAGES CSS
    add_filter( ‘stylesheet_uri’, ‘my_stylesheet’, 10, 2 );

    function my_stylesheet( $stylesheet_uri, $stylesheet_dir_uri ) {

    if ( is_page() )
    $stylesheet_uri = $stylesheet_dir_uri . ‘/style.css’;

    if ( is_home() )
    $stylesheet_uri = $stylesheet_dir_uri . ‘/home-style.css’;

    elseif ( is_category(‘3’) )
    $stylesheet_uri = $stylesheet_dir_uri . ‘/portfolio.css’;

    return $stylesheet_uri;
    }

Viewing 1 replies (of 1 total)
  • Jonas Grumby

    (@ss_minnow)

    You can use Conditional Tags to state that if it is a certain category you want to use a different stylesheet, header, sidebar, whatever.

    I don’t think you have to put anything in functions.php. At least I never do. I put the code where the file is being called.

Viewing 1 replies (of 1 total)
  • The topic ‘custom category template, thematic child theme’ is closed to new replies.