WordPress.org

Support

Support » Themes and Templates » Single post templates

Single post templates

Viewing 3 replies - 1 through 3 (of 3 total)
  • nsathees

    @nsathees

    If you want different theme for both of them then use this

    <?php
    $post = $wp_query->post;
    if ( in_category(‘5’) ) {
    include(“single2.php”);
    }elseif(in_category(‘7’)) {
    include(“single3.php”);
    } else {
    include(“single1.php”);
    }
    ?>

    You would add an elseif statement, something like this:

    <?php
    $post = $wp_query->post;
    if ( in_category( '5' ) ) {
        include( "single2.php" );
    } elseif( in_category( '6' ) ) {
        include( "single3.php" );
    } else {
        include( "single1.php" );
    }
    ?>
    Kristen

    @kristenbrooke

    Thank you both so much for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Single post templates’ is closed to new replies.