PDA

View Full Version : Getting a specific thread inside a wordpress template


liam1412
10-18-2011, 05:35 PM
Hi,

Can anyone point me in the right direction of how to do this,

A client wants blog posts syndicating as threads, and the comments on the wordpress post to be the replies to the thread.

I have got as far as


$currentDir = getcwd();
chdir($_SERVER['DOCUMENT_ROOT'].'/forum');
require_once('global.php');
chdir($currentDir);


But when I do var_dump($vbulletin) there is nothing there.

Any help would be appreciated.

kh99
10-18-2011, 08:12 PM
I tried your code and it works for me. Did you put an echo() in there to make sure you're calling the right script? (I know that's not much help but I'm not sure what else to try).

Is all that code outside of any function? (If the var_dump() is in a function you may need a global $vbulletin; in there).

liam1412
10-23-2011, 02:03 PM
Thanks for the reply

I figured you can't actually call the vb core withing a wordpress template, you have to call in in the wp-header file.

All sorted now though.

Thanks