Title: Cannot Get  is_single() working &#8211; Help
Last modified: August 30, 2016

---

# Cannot Get is_single() working – Help

 *  [stevespi](https://wordpress.org/support/users/stevespi/)
 * (@stevespi)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/cannot-get-is_single-working-help/)
 * Hi, I have been trying for days to get a function working. Basically I want to
   hook into the $content only on Posts and not Pages. This displays on every page.
   Just cannot think what is wrong with it. Any help would be much appreciated.
 *     ```
       if (!is_single() || get_post_type() == 'post') {
       function add_form_to_post( $content ) {
           $custom_content = '[contact-form-7 id="73" title="Blogger Response"]';
           $content.= $custom_content;
           return $content;
       }
       add_filter( 'the_content', 'add_form_to_post' );
       } {
         // blank
       }
       ```
   

The topic ‘Cannot Get is_single() working – Help’ is closed to new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [stevespi](https://wordpress.org/support/users/stevespi/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/cannot-get-is_single-working-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
