Passing variables in to wordpress pages
-
Hello everyone, I’ve been searching on how to do this but I just can’t seem to get it working. I have a config.php file inside the main directory of my wordpress installation. Basically I have this config file full of variables that I would like to apply to all my pages. So that when I change the site I can just change the one config file to replace names etc. I’m using php exec to echo the variables where I need them but it’s not working.
The config looks like this…
$config['fname'] = "Bob"; $config['lname'] = "Smith";etc…
I’ve tried using an include in the header for the file but it’s not working and I don’t know what I’m doing wrong. Seems simple enough but I’m kind of a newb and I don’t know what I’m missing.
The topic ‘Passing variables in to wordpress pages’ is closed to new replies.