Nov 28 2007
Pass a php variable from a Wordpress post to a Wordpress script
- 0 Comments
Here’s a little trick to pass a php variable from a Wordpress post to you php scripts on your server
It took me a bit for this one, but it was pretty simple. In Wordpress use your favorite plugin that lets you pass php in your blog, in my case I use InlinePHP. Surround your variable with something like, [phptag] global $keyword; $keyword=”wordpress”;[/phptag]. Now in you php files related to Wordpress, you would do the same thing, call global $keyword, and you can use that variable in your script.
The main key to remember is to call your php variable GLOBAL.

