• Hello, would I like to know if someone created different single.php for every category?
    I am using a theme, which calls bp-columns, and copy the following code is in my single.php:

    <?php
    $post = $wp_query->post;
    if (in_category('25')) {
    include(TEMPLATEPATH.'/single25.php');
    }   elseif (in_category('64')) {
    include(TEMPLATEPATH.'/single64.php');}
        elseif (in_category('128')) {
    include(TEMPLATEPATH.'/single128.php');}
        else {include(TEMPLATEPATH.'/single-original.php');
        }
        ?>

    In the same directory, I have these .php.
    The problem is that when I deposit a post with id 25 for example, the screen stays in white and does not load anything.
    Does someone know to which it owes?

The topic ‘use different single template per category’ is closed to new replies.