Support » Themes and Templates » Help creating multiple single posts for different categories

  • Hi all,

    I’m trying to make all the posts in the “women” category of my website appear differently to the rest of my posts when viewed as single posts, e.g. the same as the Women category page which has a distinct style compared to the rest of the site.

    I followed the advice here and replaced single.php with the following code;

    <?php
    $post = $wp_query->post;
    if ( in_category('4') ) {
    include(TEMPLATEPATH . '/single2.php');
    } else {
    include(TEMPLATEPATH . '/single1.php');
    }
    ?>

    where single1.php is my standard single post template and single2.php is the special one.

    So far, nothing doing. Anyone got any suggestions?

    Thanks 🙂

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Help creating multiple single posts for different categories’ is closed to new replies.