Archived

This topic is now archived and is closed to further replies.

  • 0

Customize Link of Fixed NavBar Logo


Question

Posted · Report post

Hi, 

 

I need help in figuring out how to change the link of the Fixed NavBar logo. It's set to go to the homepage, but I need it to go somewhere specific. 

 

thanks for any help you can provide.

 

 

Share this post


Link to post
Share on other sites

4 answers to this question

Posted · Report post

Hi Lex

 

The below will amend the link and image in the fixed navbar.

add_filter( 'navbar_brand', 'my_logo_url' );
function my_logo_url( $logo ) {
return '<a class="plbrand" href="Add Link Here" title=""><img class="mainlogo-img" src="Add Path To Image Here" alt="" /></a>';
}
1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

Amazing! thank you so much!

 

 

Hi Lex

 

The below will amend the link and image in the fixed navbar.

add_filter( 'navbar_brand', 'my_logo_url' );
function my_logo_url( $logo ) {
return '<a class="plbrand" href="Add Link Here" title=""><img class="mainlogo-img" src="Add Path To Image Here" alt="" /></a>';
}

Share this post


Link to post
Share on other sites

Posted · Report post

Hi James, 

 

This works for the standard navigation, but I'm trying to modify the logo & link on the fixed nav bar.

 

Hi there, check out this post which has a filter on which will help - http://www.pagelines.com/forum/topic/25406-change-default-branding-href/

 

You'll need to put the code into the functions.php of a child theme like the 'base theme' or the customize plugin for it to work.

Share this post


Link to post
Share on other sites