Jump to content


Photo
- - - - -

brandnav logo link

brandnav logo link

Best Answer Danny , 13 May 2013 - 11:59 AM

That code isn't CSS, its a hook filter, so that code needs to go into the functions.php file of either your child theme or customise plugin whichever you're using.

 

I recommend you read our customisation methods and hooks documentation.

 

http://support.pagel...zation-methods/

http://support.pagel...mization/hooks/

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 abanze

abanze

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 13 May 2013 - 09:09 AM

i want to change the brandnav logo link to another website

this custom code is not working:

 

 

add_filter ( 'navbar_brand', 'my_logo_url' );
function my_logo_url( $logo ) {
return '<a class="plbrand" href="

Please Login or Register to see this Hidden Content

" title=""><img class="mainlogo-img" src="

Please Login or Register to see this Hidden Content

" alt="" /></a>';
}

 

thank you for helping!

alfred

 

Please Login or Register to see this Hidden Content

 



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15242 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 13 May 2013 - 09:54 AM

Hi Alfred,

 

Your code is slightly incorrect, see this topic for the correct code.

 

Please Login or Register to see this Hidden Content



#3 abanze

abanze

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 13 May 2013 - 10:21 AM

hi Danny,

no, not working. I did:

 

 

add_filter( 'pagelines_site_logo', 'my_logo_url' );

function my_logo_url( $logo ) {

return '<a class="plbrand mainlogo-link" href="

Please Login or Register to see this Hidden Content

" title=""><img class="mainlogo-img" src="

Please Login or Register to see this Hidden Content

" alt="" /></a>';

 

}

 

 

if i copy it into the "custom code" field of pageline

it says LESS COMPILE ERROR failed at `; ` line: 1007

 

and the code in the pageline window changes like that:

 

add_filter( 'pagelines_site_logo', 'my_logo_url' );
function my_logo_url( $logo ) {
return '';
 
}

 

any idea? thank you!



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15242 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 13 May 2013 - 11:02 AM

I added the code to my test site, I never received any compile error or have the code change. Where abouts did you add the code ?



#5 abanze

abanze

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 13 May 2013 - 11:45 AM

hm, 

i put it into the "CSS/LESS Rules" field of pageline. 

i put it at the end. this is all i have there:

 

body{}

.fpost .post-header {float: none; clear: both; padding-top: 10px; text-decoration: none}
.metabar {display:none;}
 
.post-meta { margin-bottom: .6em !important;}
.main-nav li a {font-size:13px; font-weight:bold; background-color: Transparent;}
.nav-content-width { border: none !important; box-shadow: none; }
h3.ev-widget-post-title {font-size:10px;}
 
hr, .fpost, .clip_box, .widget-title, .metabar a, #morefoot .widget-title, #site #dsq-content h3, .navigation_wrap{border-bottom: 4px solid transparent;}
 
.main-nav li a:hover, .main-nav li.current_page_item > a, .main-nav li.current-page-ancestor > a {background-color: Transparent !important;}
 
.video-js-box {background: #ffffff; border: 8px solid #ffffff !important;}
img {padding:8px; background:#ffffff;}
.wp-thumb-overlay {background: #ffffff; border: 2px solid #ffffff;}
 
.mainlogo-img {background: transparent !important;}
h1.entry-title, h2.entry-title {font-size:20px !important;}
 
#brandnav .brandnav-nav { margin-top: 45px;}
body.fixed_width #page {padding-top: 0px;}

 

 

 

 

add_filter( 'pagelines_site_logo', 'my_logo_url' );

function my_logo_url( $logo ) {

return '<a class="plbrand mainlogo-link" href="

Please Login or Register to see this Hidden Content

" title=""><img class="mainlogo-img" src="

Please Login or Register to see this Hidden Content

" alt="" /></a>';

 

}



#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 15242 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 13 May 2013 - 11:59 AM   Best Answer

That code isn't CSS, its a hook filter, so that code needs to go into the functions.php file of either your child theme or customise plugin whichever you're using.

 

I recommend you read our customisation methods and hooks documentation.

 

Please Login or Register to see this Hidden Content

Please Login or Register to see this Hidden Content