Can You Use Variables Inside Posts and Pages? (3 posts)

  1. bakert
    Posted 9 years ago #

    I would like to know if it is possible to use WordPress (or other) variables in Posts or Pages. I know I can make changes to templates but what if I want the code, "ADMIN_EMAIL" to be replaced by my email address on the fly as the post is retrieved from the database each time.

    Is that possible?

    Thanks, Tom.

  2. Kafkaesqui

    Posted 9 years ago #

    If you mean within the content of a post or Page, you'd have to use a plugin like RunPHP or PHP Exec, both of which you'll find linked to here:


  3. davidchait
    Posted 9 years ago #

    Well, or there are a number of 'replacement' plugins that will look for some keyword/phrase and replace with another... The example you gave doesn't require PHP coding, just a stock replace-on-the-fly thing.


Topic Closed

This topic has been closed to new replies.

About this Topic