Help creating multiple single posts for different categories (2 posts)

  1. volsunga
    Posted 8 years ago #

    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;

    $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 :-)

  2. dannybcastillo
    Posted 8 years ago #

    Just read and install the plugin. You won't have make that if else statement to make it work.

Topic Closed

This topic has been closed to new replies.

About this Topic