• Okay, I’m sure the answer to this question is really simple, but I can’t figure it out…

    I’m trying to edit my blogroll.php file (which appears in my right column) to exclude a certain portion of my blogroll on a particular Page on my blog. Here is the relevant portion of the code that I’m using:

    <?php
    if (is_page('non-sports') { }
    else {
    ?>
    
    <div> [college basketball blogroll] </div>
    
    <?php } endif; ?>
    
    <div> [more blogroll stuff] </div>

    On the “non-sports” page, the college basketball blogroll is indeed excluded, but so is everything else! Everything that appears after the initial if/else statement does not appear on that page. Whereas, I want to exclude only the college basketball blogroll, and leave in everything that comes after it (the “more blogroll stuff”).

    This leads me to believe I’m not properly closing the if/else query, but I can’t figure out what I’m not doing. I’ve tried various different configurations with the brackets, the endif, the semicolon, etc., but no luck.

    So… what am I doing wrong?

  • The topic ‘Conditional tags in blogroll – PHP help needed’ is closed to new replies.