Title: Execute php function in post content
Last modified: August 19, 2016

---

# Execute php function in post content

 *  [pipelineae](https://wordpress.org/support/users/pipelineae/)
 * (@pipelineae)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/)
 * I’m currently working a plugin that requires custom content to be displayed in
   a post via a tag being inserted by the user.
 * I am so sure that I’ve come across such a feature that was added in recently,
   but I can’t find the codex page again! I’ve been looking around for the past 
   couple of days, and I just can’t find the page again.
 * Am I right? Does a function allowing me to declare custom tags exist and I’m 
   not going crazy, or am am I going to have to achieve this with strreplace and
   a pre_content hook?
 * Regards

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

 *  [t31os](https://wordpress.org/support/users/t31os/)
 * (@t31os)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/#post-1029550)
 * Does this help?
 * [http://codex.wordpress.org/Plugin_API/Hooks_2.0.x](http://codex.wordpress.org/Plugin_API/Hooks_2.0.x)
 *  Thread Starter [pipelineae](https://wordpress.org/support/users/pipelineae/)
 * (@pipelineae)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/#post-1029606)
 * Thanks for the suggestion, but no. I’ve already looked through all the hooks 
   and filters for it. I’m fairly sure it’s a function not a hook.
 * Running a filter to manipulate the content before it is displayed is my backup
   plan. I was originally under the the impression you could define a tag which,
   when placed in a post’s content, would execute a defined code.
 * I am however having trouble finding it again.
 * Cheers
 *  [t31os](https://wordpress.org/support/users/t31os/)
 * (@t31os)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/#post-1029620)
 * Ah hah!…
 * Shortcodes…
    [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)
 * If i’m thinking what you’re thinking, and you’re thinking what i’m thinking, 
   then that’s what you’re looking for… 🙂
 *  Thread Starter [pipelineae](https://wordpress.org/support/users/pipelineae/)
 * (@pipelineae)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/#post-1029650)
 * You are a life saver, thanks mate!
 * That’s exactly what I was talking about, cheers.
 *  [t31os](https://wordpress.org/support/users/t31os/)
 * (@t31os)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/#post-1029654)
 * I knew what you meant the first time, but the wording lost me when it came to
   google…
 * Had looked at a plugin that used shortcodes recently though, so fortunately the
   term popped into my head after a little while… 🙂
 * Curious to know what it is you’re implementing if you don’t mind my asking?

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

The topic ‘Execute php function in post content’ is closed to new replies.

## Tags

 * [custom tags](https://wordpress.org/support/topic-tag/custom-tags/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [post tags](https://wordpress.org/support/topic-tag/post-tags/)

 * 5 replies
 * 2 participants
 * Last reply from: [t31os](https://wordpress.org/support/users/t31os/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/execute-php-function-in-post-content/#post-1029654)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
