PHP in WordPress - Setting & Accessing Variables

5 replies
I'm using Exec-PHP to execute code, and it's working.

I want to be able to set a variable once upon & access that variable in individual posts.

I tried putting the code in header.php, then about everywhere else.

But when I put

<?php echo $var_name; ?> in the post, it's blank.


#accessing #php #setting #variables #wordpress

Trending Topics