Title: How To Make A PHP Include Function Within A Post
Last modified: August 20, 2016

---

# How To Make A PHP Include Function Within A Post

 *  [Farwalker](https://wordpress.org/support/users/farwalker/)
 * (@farwalker)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/how-to-make-a-php-include-function-within-a-post/)
 * Thanks in advance for any guidance.
 * Goal:
    Add a simple php include in a post and have it actually work.
 * Issue:
    I used to use simple php includes in custom websites, but when I put 
   php include code in a post, it nullifies the php code.
 * Is there a proper way to add php include code in a WP post or should one use 
   a PHP include plugin to get the job done? ( I know there’s a few out there, but
   wanted to make sure that was the route to go before implementing a plugin)
 * Thanks for your guidance!

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

 *  [security_man](https://wordpress.org/support/users/security_man/)
 * (@security_man)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/how-to-make-a-php-include-function-within-a-post/#post-2222363)
 * plugin is the way i have done that in the past… unless you can hard code it into
   the template then thats the way to do it imho
 *  Thread Starter [Farwalker](https://wordpress.org/support/users/farwalker/)
 * (@farwalker)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/how-to-make-a-php-include-function-within-a-post/#post-2222444)
 * Thanks for the reply Security Man – might end up doing that. Anyone else have
   any thoughts on the question? Thanks.
 *  [Jay](https://wordpress.org/support/users/phyrax/)
 * (@phyrax)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/how-to-make-a-php-include-function-within-a-post/#post-2222445)
 * I say just use shortcodes. [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)
 * It’s way more simple and all you have to do is edit your theme’s functions file
   and add say one line to it. Then you use your function when you need too.

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

The topic ‘How To Make A PHP Include Function Within A Post’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 3 participants
 * Last reply from: [Jay](https://wordpress.org/support/users/phyrax/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/how-to-make-a-php-include-function-within-a-post/#post-2222445)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
