Title: Using php in posts?
Last modified: August 19, 2016

---

# Using php in posts?

 *  Resolved [caemusic](https://wordpress.org/support/users/caemusic/)
 * (@caemusic)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/using-php-in-posts/)
 * It is possible to use php in posts?
 * To be specific, I’m trying to display content conditionally based on whether 
   the user is logged in (logged in users see supplementary material, unlike protection
   that hides the whole post). If there is a better way of doing this than including
   php in posts, please enlighten me!
 * Thanks!

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

 *  [dwords](https://wordpress.org/support/users/dwords/)
 * (@dwords)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/using-php-in-posts/#post-960512)
 * There might be a plugin that does what you want using shortcode [hide-this] something
   like this [/hide-this]
 * But I don’t know the name of that plugin, if it exists.
 * If you want to run PHP inside a Post, I think you need to install a plugin like
   Run PHP,
    [http://wordpress.org/extend/plugins/runphp/](http://wordpress.org/extend/plugins/runphp/)
 *  Thread Starter [caemusic](https://wordpress.org/support/users/caemusic/)
 * (@caemusic)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/using-php-in-posts/#post-960538)
 * I figured it out, the checkbox was in a different place on the option panel. 
   Contrary to the Install instructions, the admin does not have this enabled by
   default in 2.7.
 *  Thread Starter [caemusic](https://wordpress.org/support/users/caemusic/)
 * (@caemusic)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/using-php-in-posts/#post-960540)
 * Sorry posted that in the wrong place. runphp worked. Great success!

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

The topic ‘Using php in posts?’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [caemusic](https://wordpress.org/support/users/caemusic/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/using-php-in-posts/#post-960540)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
