WordPress.org

Support

Support » Plugins and Hacks » Can’t access variables I just defined on the same page

Can’t access variables I just defined on the same page

  • aight, I’m using exec-php to enable php in my posts. I define a variable in my post…for example:

    <?php $hello = "sup"; ?>

    what I would like to be able to do is utilize $hello in my single post template. However, no matter how I’ve tried to access it, for example:

    <?php echo "$hello"; ?>
    <?php if (isset($hello)) { ?>

    …I can’t get the template to even acknowledge $hello is set. Anyone here know why, or what I should do about this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can’t access variables I just defined on the same page’ is closed to new replies.