Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Adding Wordpress Header to Vanilla

netigatenetigate New
edited February 2013 in Vanilla 2.0 - 2.8

Hi,

i need to display the wordpress admin bar, when users are logged in and need to integrate the wordpress header into vanilla. i already tried to add the following to my themes default.master.php in the header, but just get errors. do you guys know more or have ideas?

require_once('/var/www/html/community/wp-load.php');
require_once('/var/www/html/community/wp-blog-header.php');
require_once('/var/www/html/community/wp-includes/admin-bar.php');
require_once('/var/www/html/community/wp-config.php');

wp_enqueue_script( 'admin-bar' );
wp_enqueue_style( 'admin-bar' );
_wp_admin_bar_init();

show_admin_bar(true);
wp_admin_bar_render();
Sign In or Register to comment.