Now for the design part, I want the vbulletin forum page to have the wordpress header and footer, searched on google and found that that can be achieved by creating a plugin/hook in vbulletin like this:
Code:
ob_start();
include( '../wp-load.php');
include('../wp-content/themes/Avada/header.php');
$wp_header = ob_get_contents();
ob_end_clean();
after that just insert $wp_header in vbulletin header file.
Problem is nothing happens, all I get is "$wp_header" written on top of my vbulletin page.
EDIT:
I have my wordpress installed in a folder 'apostasgreen',
and vbulletin in the folder 'apostasgreen/forum'.
maybe my file paths are wrong?
EDIT 2:
Getting slowly there, got a few improvements after searching in google:
1. Do not use 'global_start' while creating the plugin, instead select 'global_bootstrap_init_start'.
2. I found this code so I changed it on the plugin and this time something actually shows up:
Code:
ob_start();
include('../wp-load.php');
include('../wp-content/themes/Avada/header.php');
$wp_header= ob_get_contents();
ob_end_clean();
$preRegister['wp_header'] = $wp_header;
vB_Template::preRegister('header', $preRegister);
After changing this code I also added this '{vb:raw $wp_header}' to vbulletin header theme file. Now it shows like this:
I think some css code is missing here, maybe path to css files are wrong, any help here please?
I