Title: Help with Conditional Tags
Last modified: August 22, 2016

---

# Help with Conditional Tags

 *  Resolved [BelleO](https://wordpress.org/support/users/belleo/)
 * (@belleo)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/help-with-conditional-tags-3/)
 * Hello,
 * I am looking to add a conditional tag so that Ads only show up on my blog page(
   which is a static page) and on all my blog posts. I do not want the ad showing
   up on any of my pages.
 * This is code I have so far using GSH
    <?php if(is_page(100) || in_category( array(
   37, 38, 39, 40, 42, 43, 44, 46, 48, 49, 50 ) ) { ?> <?php } ?>
 * But I can’t seem to get it working and it shows up with an error message on the
   site. I am about to pull my hairs out trying to figure this out. Please someone
   help!

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

 *  [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * (@respectyoda)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/help-with-conditional-tags-3/#post-5169041)
 * You forgot one “)”.
 *     ```
       <?php if( is_page(100) || in_category( array( 37, 38, 39, 40, 42, 43, 44, 46, 48, 49, 50 ) ) ) { ?>
       <?php } ?>
       ```
   
 *  Thread Starter [BelleO](https://wordpress.org/support/users/belleo/)
 * (@belleo)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/help-with-conditional-tags-3/#post-5169097)
 * That worked! Thank you so much, you just saved me from having a meltdown. Much
   respect 🙂
 *  [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * (@respectyoda)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/help-with-conditional-tags-3/#post-5169098)
 * You are welcome! 🙂

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

The topic ‘Help with Conditional Tags’ is closed to new replies.

## Tags

 * [conditional tags](https://wordpress.org/support/topic-tag/conditional-tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/help-with-conditional-tags-3/#post-5169098)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
