Tagged: transparent logo
-
AuthorPosts
-
August 30, 2017 at 8:12 pm #845947
Hi,
I’m trying to swap out the logo on specific pages. I have worked out how to change the logo upon scroll using the following filter:
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
if(is_page(1114)) {
$logo = “http://mysite/Nadalie_FR_logo.jpg”;
}
return $logo;
}
However, it is the ‘Transparent’ logo that I cannot figure out how to target or change for the page.
Thank you!August 30, 2017 at 8:26 pm #845950Hey jillsross,
I added following code to Functions.php file in Appearance > Editor
add_filter('avf_logo_subtext', 'kriesi_logo_addition'); function kriesi_logo_addition($sub) { if(is_page(1114)) { $sub .= '<img class="alternate" src="https://kriesi.at/wp-content/themes/kriesi/images/logo.png"/>'; } return $sub; }
Please review your website
Best regards,
YigitAugust 30, 2017 at 8:30 pm #845951You are amazing, thank you that worked!!!
August 30, 2017 at 9:00 pm #845961Sorry, last question! I’m trying to add the same filter to customize another page but my code keeps breaking the site
This is what I am assuming I need to do but it’s clearly wrong. I am guessing that just repeating the filter is not how this is accomplished?
/*
* first custom page
*/
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
if(is_page(1114)) {
$logo = “http://mysiteFR_logo.jpg”;
}
return $logo;
}
add_filter(‘avf_logo_subtext’, ‘kriesi_logo_addition’);
function kriesi_logo_addition($sub) {
if(is_page(1114)) {
$sub .= ‘‘;
}
return $sub;
}
/*
* second custom page
*/
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
if(is_page(1114)) {
$logo = “http://mysite.com/secondpage_logo.jpg”;
}
return $logo;
}
add_filter(‘avf_logo_subtext’, ‘kriesi_logo_addition’);
function kriesi_logo_addition($sub) {
if(is_page(1114)) {
$sub .= ‘‘;
}
return $sub;
}August 30, 2017 at 11:05 pm #845995Hi,
If this is for another page then the page id (1114) needs to be different. Also, the function name should be different so it doesn’t overwrite the previous function with the same name.
Best regards,
Jordan ShannonAugust 31, 2017 at 12:59 am #846031Thanks Jordan got it!
August 31, 2017 at 7:07 am #846088Hi,
No problem at all. Were you able to get this figured out?
Best regards,
Jordan ShannonAugust 31, 2017 at 2:58 pm #846270Yes, thank you so much!
August 31, 2017 at 3:04 pm #846277Hey!
You are welcome! :)
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)Best regards,
Yigit -
AuthorPosts
- The topic ‘Change Transparent Logo on specific page’ is closed to new replies.