Title: Exclude code from one post
Last modified: August 19, 2016

---

# Exclude code from one post

 *  [Arash](https://wordpress.org/support/users/john25/)
 * (@john25)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/exclude-code-from-one-post/)
 * I have a blog with over 300 post that all use single.php
 * Within single.php I have a adsense code and would like to exclude it from 1 page.
 * Is there something like, if post = 294 diplay 
    and else display adsense code?
 * Or is there another way to exclude code from one post?

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

 *  [Piotr Sochalewski](https://wordpress.org/support/users/sproject/)
 * (@sproject)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/exclude-code-from-one-post/#post-1642529)
 * Try this.
 *     ```
       if (is_single('294')==false)
       { adsense code }
       ```
   
 *  Thread Starter [Arash](https://wordpress.org/support/users/john25/)
 * (@john25)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/exclude-code-from-one-post/#post-1642531)
 * Thank you!

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

The topic ‘Exclude code from one post’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [exclude](https://wordpress.org/support/topic-tag/exclude/)
 * [single.php](https://wordpress.org/support/topic-tag/single-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Arash](https://wordpress.org/support/users/john25/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/exclude-code-from-one-post/#post-1642531)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
