A while back I created my own blog engine which worked for me at the time, however I can now see that it does not "cut the mustard" in todays modern blogging world.
I have decided to integrate WordPress into my site. I have created a new theme and followed these very good instructions from Jonathan Wold: http://www.jonathanwold.com/tutorials/wordpress_integration/
I do have one problem though:
My existing php site uses global variables for various tasks, one of which is an internal page id used whenever I need to pickup page specific data. On my pages with wordpress content, I cannot access any of my globals from within a function.
As a test and to illustrate clearer, this code is in my themes header file: (mysiteheader.php sets up all the global variables and outputs header, nav bar etc).
<?php
include "mysiteheader.php";
echo "[" . $internalPageID . "]";
testFunction();
function testFunction()
{
global $internalPageID;
echo "[" . $internalPageID . "]";
}
?>
Results in a page with navigation as expected and the following text:
[blog][]
indicating that internalPageID is not within the scope of the testFunction.
Has anybody experienced this before or know of a workaround? Is there some sort of directive that wordpress uses which disables global?
Thanks in Advance
Tim