Forums

[resolved] Conditional php statement not working (2 posts)

  1. pu_rplecow
    Member
    Posted 3 years ago #

    My blog runs properly and has other if statements and loops which work fine. What I can't understand is why i can't get the below statement to run!


    <?php if ( is_home() ) { query_posts('cat=-14&showposts=1'); } ?>

    But without the IF statement,

    <?php query_posts('cat=-14&showposts=1'); ?>

    it works as it should!

    I can't get

    <?php if ( in_category('3') ) { ?>
    blah blah
    <?php } else { ?>
    blah blah
    <?php } ?>

    to work either! It seems to be ignored..

    I'm running wp2.0.4 and tried both on PHP5 and PHP4. Sigh.. It seems to be so simple and its driving me nuts. If any more info is needed please don't hesitate to ask for it..

  2. pu_rplecow
    Member
    Posted 3 years ago #

    ARGH!! I can't believe it!! After 3 days of wracking my brains it was a plugin that was messing with the queries on the home page. That cause all my queries to make multiple loops all messed up! Thanks to all who read anyways. Must have seemed like a ridiculous problem. Everything is working fine now.

Topic Closed

This topic has been closed to new replies.

About this Topic