Hide nav bar on profile
-
I’m trying to hide the entire nav bar on the profile page.
It’s unless to me I already
Have all the links In my header menu.
-
The easiest way to do this is to edit the home.php file. You’ll need to comment out
bp_get_displayed_user_nav()
and the related markup.Ref: your-child-theme/buddypress/members/single/home.php
Tyvm for the reply,I also found another way by adding this to header.php
<?php if ( bp_is_my_profile() ) { ?> <style type="text/css" media="screen"> div#item-nav { display: none !important; } </style> <?php } ?>
Right now Im trying to Figuer out how to hide the profile cover and avatar
On the profile page.I might be able to use same code above and just change out #item-nav to
#Profile-cover-inner.I’ll have to see
Found the solution to that last post
#Profile-cover-inner. Will only take out the actual pic.This will get ride of the Avatar and profile cover container,
Added to style.css.buddypress div#item-header { display: none !important }
But I think I’ll add a toggle the container to switch it on or off. I will need to research how to do that.
I forgot to mention to comment out line 28-38 in the home.php
I use a child theme .php may differ for others.Should look like this
<?php /** If the cover image feature is enabled, use a specific header if ( version_compare( BP_VERSION, '2.4', '>=' ) && bp_displayed_user_use_cover_image_header() ) : bp_get_template_part( 'members/single/cover-image-header' ); else : bp_get_template_part( 'members/single/member-header' ); endif; */ ?>
If not commented out u will get blank page.
For the hide nav bar code that was posted dont forget to comment out
Lines 110-112 in the home.php because it will cause a conflict when u hide that nav bar.// If nothing sticks, load a generic template // else : // bp_get_template_part('members/single/plugins');
@henrywright ty for heading me towards the right path.
- You must be logged in to reply to this topic.