BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › admin toolbar not showing
- This topic has 27 replies, 4 contibutors, and was last updated 9 years, 10 months ago by Maria.
Question
January 19, 2015 at 3:21 pm #34873@interglobalmedia@tjchester,
Sorry for not getting back to you sooner. Didn’t realize I had this response from you! I am using the parent theme. Just to clarify, I STILL have no admin bar for other users. Have it for myself. Is it meant to be this way or not? Thanks for all your help and sorry again for delayed response.
Answers
January 19, 2015 at 4:06 pm #34876@alyssa-buddyboss
AlyssaParticipant@interglobalmedia you may want to try reinstalling all WordPress manually, via FTP. From your reply 34508 it is not a theme issue:
I just turned off all plugins except buddypress, and switched to another theme just to see what would happen, and I still didn’t get an admin bar for members.
So even with another theme you do not see the adminbar, last thing to check is WordPress.January 19, 2015 at 4:17 pm #34880@interglobalmediaI was using the parent theme,and no toolbar on the front end appears for other members. Only myself, the administrator. I just don’t understand, because as you know, I turned everything off. I have fooled around with Buddypress settings too, and to no avail in any way. This is really driving me crazy at this point. I’m going into the WP, Buddypress, and Buddyboss code to see if there is anything funky going on anywhere, but nothing pops out at the moment that I know of. Something is up somewhere tho. Would like to get this toolbar back for my users. Thanks for your all your help.
January 19, 2015 at 4:47 pm #34881@interglobalmediaFor anyone who is having visibility issues with the toolbar for users other than the admin, I did a bunch of research on the WP Codex regarding the toolbar, checked out code in the functions pages, and then studied the WP user profile area. Guess what? It’s as easy as checking off the box in the user profile page entitled “Toolbar: Show Toolbar when viewing site’. When you check the box, the toolbar appears in the front end. If the box is NOT checked for any individual user, the toolbar will not appear.
Toolbar appearing in the front end is the default for admins only. The code reflected that. My box was checked. I had not checked it myself.
@tjchester,
Is there any way of automating this so that initially members other than the admin will by default have the toolbar show on the front end? This is a new WP feature I believe. That’s why it suddenly disappeared on me and others who were not aware of the checkbox. Hope this helps!
January 19, 2015 at 5:07 pm #34882@interglobalmediaAnd btw, the change has to be made through the theme being used.
January 19, 2015 at 9:10 pm #34884@alyssa-buddyboss
AlyssaParticipant@interglobalmedia can you explain how this change needs to made through the theme so I have something to send to our developers?
January 20, 2015 at 7:02 am #34890@interglobalmediaHi @tjjester,
According to the WordPress Codex, code has to be added/changed in the theme being used:
http://codex.wordpress.org/Function_Reference/show_admin_bar
I’m really not quite sure what code should be placed.
I for one, and I’m sure many others, merge the WP user profiles with Buddypress profiles. So what affects WP also affects BP. And since users other than the admin can’t get in to the backend (and neither would we want them to), they would not be able to check off the box. The problem is that the admin would have to do this by hand for each individual new user that comes along.
Hope this helps.
January 20, 2015 at 2:32 pm #34894@alyssa-buddyboss
AlyssaParticipant@interglobalmedia are you saying by adding this code to functions.php all users get the admin bar on your site:
show_admin_bar( true );
January 20, 2015 at 2:49 pm #34896@interglobalmediaNo, I am not. I did mention that I honestly do not know what code should be used. I just wanted to show that according to WP, the change has to be made in the theme that is being used. Thanks.
January 20, 2015 at 6:04 pm #34900@alyssa-buddyboss
AlyssaParticipant@interglobalmedia gotcha. Our theme does not call this function explicitly but by using the call to wp_footer() in footer.php it is included in the theme indirectly. I know this doesn’t help your situation but I’m not sure what else to tell you about your unique issue.
January 21, 2015 at 12:58 pm #34916@interglobalmedia@tjchester,
I resolved my issue. I went into my my wp-includes folder for LetsBSocial.com, and into the admin.bar file and came across the following:
/* Instantiate the admin bar */
/**
* Filter the admin bar class to instantiate.
*
* @since 3.1.0
*
* @param string $wp_admin_bar_class Admin bar class to use. Default ‘WP_Admin_Bar’.
*/
$admin_bar_class = apply_filters( ‘wp_admin_bar_class’, ‘WP_Admin_Bar’ );
if ( class_exists( $admin_bar_class ) )
$wp_admin_bar = new $admin_bar_class;
else
return false;$wp_admin_bar->initialize();
$wp_admin_bar->add_menus();return true;
}
// Don’t remove. Wrong way to disable.
add_action( ‘template_redirect’, ‘_wp_admin_bar_init’, 0 );
add_action( ‘admin_init’, ‘_wp_admin_bar_init’ );/**
* Render the admin bar to the page based on the $wp_admin_bar->menu member var.
* This is called very late on the footer actions so that it will render after anything else being
* added to the footer.
*
* It includes the action “admin_bar_menu” which should be used to hook in and
* add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
* right before the admin bar is rendered. This also gives you access to the $post global, among others.
*
* @since 3.1.0
*/
function wp_admin_bar_render() {
global $wp_admin_bar;if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) )
return false;This is what it should be:
/* Instantiate the admin bar */
/**
* Filter the admin bar class to instantiate.
*
* @since 3.1.0
*
* @param string $wp_admin_bar_class Admin bar class to use. Default ‘WP_Admin_Bar’.
*/
$admin_bar_class = apply_filters( ‘wp_admin_bar_class’, ‘WP_Admin_Bar’ );
if ( class_exists( $admin_bar_class ) )
$wp_admin_bar = new $admin_bar_class;
else
return true;$wp_admin_bar->initialize();
$wp_admin_bar->add_menus();return true;
}
// Don’t remove. Wrong way to disable.
add_action( ‘template_redirect’, ‘_wp_admin_bar_init’, 0 );
add_action( ‘admin_init’, ‘_wp_admin_bar_init’ );/**
* Render the admin bar to the page based on the $wp_admin_bar->menu member var.
* This is called very late on the footer actions so that it will render after anything else being
* added to the footer.
*
* It includes the action “admin_bar_menu” which should be used to hook in and
* add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
* right before the admin bar is rendered. This also gives you access to the $post global, among others.
*
* @since 3.1.0
*/
function wp_admin_bar_render() {
global $wp_admin_bar;if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) )
return true;Hope this helps others who might have this issue.
January 21, 2015 at 3:54 pm #34927@alyssa-buddyboss
AlyssaParticipantInteresting, definitely appears to be a WordPress issue…
January 21, 2015 at 4:15 pm #34931@interglobalmediaGo figure. But when you have wp merged with bp, its not necessarily immediately apparent. At least it wasn’t to me. An honestly, I found it on my own, not thru codex. It took a lot of searching!
- The question ‘admin toolbar not showing’ is closed to new replies.