Title: Conditional php statement not working
Last modified: August 18, 2016

---

# Conditional php statement not working

 *  Resolved [pu_rplecow](https://wordpress.org/support/users/pu_rplecow/)
 * (@pu_rplecow)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/conditional-php-statement-not-working/)
 * 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..

Viewing 1 replies (of 1 total)

 *  Thread Starter [pu_rplecow](https://wordpress.org/support/users/pu_rplecow/)
 * (@pu_rplecow)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/conditional-php-statement-not-working/#post-466031)
 * 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.

Viewing 1 replies (of 1 total)

The topic ‘Conditional php statement not working’ is closed to new replies.

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [if](https://wordpress.org/support/topic-tag/if/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [statements](https://wordpress.org/support/topic-tag/statements/)

 * 1 reply
 * 1 participant
 * Last reply from: [pu_rplecow](https://wordpress.org/support/users/pu_rplecow/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/conditional-php-statement-not-working/#post-466031)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
