BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Mobile Header
Tagged: boss, mobile header
- This topic has 5 replies, 2 contibutors, and was last updated 9 years, 8 months ago by Alyssa.
Question
March 9, 2015 at 6:34 pm #37081@
Anonymous@tjchester,
I’d like to have the mobile header site title link change once logged in. Is that possible? I have already made the change on desktop, but am not sure how to do it for mobile. Also, how could I remove the menu icon on the left of the mobile header from view until logged in? Sorry about the blocked out content, working on a secret project.
Answers
March 9, 2015 at 8:04 pm #37090@alyssa-buddyboss
AlyssaParticipant@ryanmaler this is extremely similar to this request: https://www.buddyboss.com/support-forums/topic/can-i-make-the-logo-direct-to-site-activity-just-for-logged-in-users/
Just substitute the line of code for the site title instead of the logo in header.php (should be adjacent to it)
Add this to custom.css to hide menu for logged out users:
#custom-nav-wrap{display:none;} .logged-in #custom-nav-wrap{display:block;}
March 9, 2015 at 8:29 pm #37092@
Anonymous@tjchester,
Took care of the icon. Thanks. But I was not able to get the site title link to change on mobile. I placed this on line 353 under the mobile header section:
<a href="<?php if(!is_user_logged_in()){echo esc_url( home_url( '/' ) );}else{echo '/action-news/';} ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
I put it in place of:
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
Was that not correct? What did I do wrong?
March 10, 2015 at 8:26 am #37101@alyssa-buddyboss
AlyssaParticipant@ryanmaler Look for this code:
<a class="mobile-site-title" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
Replace with this:
<a class="mobile-site-title" href="<?php if(!is_user_logged_in()){echo esc_url( home_url( '/' ) );}else{echo '/action-news/';} ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
March 10, 2015 at 10:30 am #37110@
AnonymousGot it. Thanks @tjchester.
March 12, 2015 at 7:20 pm #37212@alyssa-buddyboss
AlyssaParticipantNP
- The question ‘Mobile Header’ is closed to new replies.