WordPress.org

Support

Support » How-To and Troubleshooting » Variable for email in posts instead of hardcoding it?

Variable for email in posts instead of hardcoding it?

  • I would like to use a variable for my email address in posts/pages so that if it changes I don’t have to go back through all my posts and change it, just change it in one place. Is that possible?

    Thanks very much, Tom

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff

    @macmanx

    You could use this template tag and then you would only have to change the email in your author profile:

    http://codex.wordpress.org/Template_Tags/the_author_email

    Thanks very much for having a look at this. This is exactly what I am looking for, only it doesn’t work inside posts and pages. I want to be able to refer to myself /inside/ a post. That is, to use a variable inside a post. Any PHP I do in a post just prints out literally though. Is there any way to do this?

    Thanks again, Tom.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Variable for email in posts instead of hardcoding it?’ is closed to new replies.
Skip to toolbar