Title: PHP Noob question
Last modified: August 19, 2016

---

# PHP Noob question

 *  [ronronmx](https://wordpress.org/support/users/ronronmx/)
 * (@ronronmx)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/php-noob-question-1/)
 * I’m trying to change some php code within my template to fit it to my needs better,
   and I have 1 small question:
 * What’s the difference between:
    `<?php if (is_single() get_sidebar()); ?>`
 * and:
    `<?php if (!is_single() get_sidebar()); ?>`
 * What does the ! do in front of is_single?
 * Thanks….

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/php-noob-question-1/#post-1216067)
 * Reverses the logic.
 * `if (is_single()` = if this is a single post
    `if (!is_single()` = if this is**
   not** a single post

Viewing 1 replies (of 1 total)

The topic ‘PHP Noob question’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/php-noob-question-1/#post-1216067)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
