Title: php if (bla bla) statement problem
Last modified: August 19, 2016

---

# php if (bla bla) statement problem

 *  Resolved [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/)
 * Can anyone tell me why this is not working?
 *     ```
       <?php if ( (is_front_page()) || (is_page(array(582))) || (is_paged() == 'false') ) { ?>
       <div>Something to include</div>
       <?php } ?>
       ```
   
 * Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377681)
 * btw. I tried also:
 *     ```
       <?php if ( (is_front_page();) || (is_page(array(582));) || (is_paged() == 'false') ) { ?>
       <div>Something to include</div>
       <?php } ?>
       ```
   
 * And it’s also not working! 🙁
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377684)
 * If you describe in words what you are trying to accomplish it might make it easier
   for others to assist.
 *  Thread Starter [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377685)
 * Just about to do it… so here:
 * IF I’m on a home page OR on specific page (but not on its paged pages) then include
   something, if not, just forget it 😉
 * Hope this is understandable.
    Thanks for helping out.
 * ps. did I mention, I’m just learning and probably making stu**d mistakes…
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377690)
 * Assuming you have `is_front_page()` is what you want…
 *     ```
       <?php
       if ( is_front_page() || is_page('582') ) { ?>
       <div>Something to include</div>
       <?php } ?>
       ```
   
 * See [Conditional Tags](http://codex.wordpress.org/Conditional_Tags)
 *  Thread Starter [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377699)
 * It still refuses to work!
    – I checked if cache is enabled, but not. Removed 
   cache instructions from config file, and disabled cache plugin. – I tried also
   variation `<?php if ( is_home() || is_page('holiday-news') ) { ?>` but that also
   does not yield results… Any other ideas? I’m using this code within sidebar if
   that has anything to do with it.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377731)
 * Could be something else messing with the query variables so put `<?php wp_reset_query();?
   >` right before your if statement to see if that resolves it.
 *  Thread Starter [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377766)
 * Thanks Michael, that done the trick 🙂
    I was going crazy already…
 *  Thread Starter [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377789)
 * Continued…. I still need the last bit.. if the page is paged then don’t show 
   it!
    How do I properly say “if it is not paged”? Something like: `<?php if ( 
   is_front_page() || is_page('582') && !$paged ) { ?>` In words: If it’s front 
   page or page 582 but not paged …
 *  Thread Starter [ronimarin](https://wordpress.org/support/users/ronimarin/)
 * (@ronimarin)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1377792)
 * I managed to do it this way:
 * <?php if ( is_front_page() || is_page(‘582’) ) { ?>
    <?php if ( !(is_paged())){?
   > <div>Something to include</div> <?php } ?> <?php } ?>
 * Is there a nicer way?
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1378060)
 * Sorry I forgot the paged thing but something like:
 * `<?php if ( (is_front_page() || is_page('582')) && !is_paged() ) { ?>`
    or even`
   <?php if ( (is_front_page() || is_page('582')) && empty($paged) ) { ?>`

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘php if (bla bla) statement problem’ is closed to new replies.

 * 10 replies
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/php-if-bla-bla-statement-problem/#post-1378060)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
