Support » Fixing WordPress » Can You Use Variables Inside Posts and Pages?

  • bakert

    (@bakert)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Kafkaesqui

    (@kafkaesqui)

    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:

    http://codex.wordpress.org/Plugins/Posts_Formatting

    davidchait

    (@davidchait)

    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.

    -d

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can You Use Variables Inside Posts and Pages?’ is closed to new replies.