• 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)
  • Thread Starter pipelineae

    (@pipelineae)

    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

    Ah hah!…

    Shortcodes…
    https://codex.www.ads-software.com/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

    (@pipelineae)

    You are a life saver, thanks mate!

    That’s exactly what I was talking about, cheers.

    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.