• Hi, I am having problems since hours to get this to work.

    I put this code in my sidebar.php but i only get errors.
    I hope someone knows a solution for this:

    <? if (is_home()) {
       query_posts($query_string . '&cat=74');
    }
    
    else if (is_single('1')){
       query_posts($query_string . '&cat=1')
    }
    
    else if (is_single('2')){
       query_posts($query_string . '&cat=2')
    }
    
    else {
       query_posts($query_string . '&cat=4')
    }
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sazuka

    (@sazuka)

    I continued to work on it and now there is no error but it always jumps to the last else{ on main page.

    <? if (is_home() || is_front_page() ) {
       query_posts($query_string . '&cat=4');
    }
    
    else if (is_single('2466')){
       query_posts($query_string . '&cat=72');
    }
    
    else {
        query_posts($query_string . '&cat=4');
    }
    ?>
    Thread Starter sazuka

    (@sazuka)

    This doesnt work for me :/

    <? if (is_home() || is_front_page()) {

    It just skips this if clause whenever i try to refresh my home/front page

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Syntax error on conditional’ is closed to new replies.