-
AuthorPosts
-
January 30, 2019 at 5:43 pm #1060563
hello, hello
I have a website that uses various logos depending on the page.
Until recently (December, last time I checked) it functioned perfectly using this method:
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
if(is_page(9) )
{
$logo = “http://kriesi.at/wp-content/themes/kriesi/images/logo.png”;
}
return $logo;
}Unfortunately it no longer works – any idea why and if there is a fix available.
cheers Charl
January 30, 2019 at 7:40 pm #1060589try again but copy / paste this into your functions.php of child-theme instead.
The code is correct – maybe you have copied it from a post like yours ;) with wrong quotation marks !:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo){ if(is_page(9)){ $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } return $logo; }
January 31, 2019 at 4:19 am #1060700Hi,
Thanks @Guenni for sharing the solution.
Let us knwo if you need any further assistance with this sissue.
Best regards,
VinayFebruary 1, 2019 at 3:37 pm #1061580Thanks guys
Sadly it still does not work. The code I am using has been functioning for months now, it is only after the last wordpress/enfold updates that it no longer works.
The only plugin I have installed since is “Disable Gutenberg” and even with this disables the problem continues.
@Guenni007 > I even added the exact code you published, simply changing the relevant page number and it did not work?At present I am adding the code to “Enfold Child: Theme Functions (functions.php)” – I have no real idea what the problem, I’ve been over the code several times and the only mistake I see is the double hh in the address of one logo file, which still has not resolved the problem?
Not sure what the problem is, so any help would be appreciated.
regards Charl
February 1, 2019 at 7:01 pm #1061669Hi,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
VinayFebruary 2, 2019 at 10:10 am #1061937Another question ( besides of a lifelink ) is it a page with transparent header?
because then you have to substitute the alternate Logo first.add_filter('avf_header_setting_filter','replace_logo_for_transparent_pages'); function replace_logo_for_transparent_pages($header){ if(is_page(9)){ $header['header_replacement_logo'] = "https://url-to-the-new-logo"; } return $header; }
that is the logo you put in on Enfold (Child) – Header – Transparency Options : “Transparency Logo”
February 3, 2019 at 5:03 pm #1062289@Guenni007 thanks for your reply, there are no transparent headers or logos on the site
@Vinay I have sent you the link, many thanksFebruary 4, 2019 at 7:50 am #1062499Hi charl,
There is no login information or token in the thread, please try posting it again.
Best regards,
RikardFebruary 4, 2019 at 10:27 am #1062576Hi Rikard
Sorry, no idea what went wrong, try now, I’ve sent the link via private content.
cheers CharlFebruary 7, 2019 at 5:26 pm #1064196Hi Charl,
Best regards,
VictoriaFebruary 8, 2019 at 6:14 am #1064423Hi Victoria
No, I just copied & pasted the recommended code, changed the page number and the logo address. Until I Googled “commented out” had no idea what it even meant – to be honest I’m still not a 100% sure I understand the definition correctly. I’m a graphic designer who loves the accessibility of Enfold and not at all proficient in coding.
regards Charl
February 8, 2019 at 10:55 pm #1064785Hi charl,
Basically, the code does not work because it is marked as the comment and so the PHP interpreter ignores is completely. Did you do it or you don’t know why it is there?
Best regards,
VictoriaFebruary 11, 2019 at 9:56 am #1065358Hi Victoria
I am a little confused. Last year I had the exact same code and it worked, sometime over Christmas, New Year I updated all my sites and then this January I noticed the logos were no longer in place – same code, different effect?
Right now I have no idea what I am meant to do? I have added the code to the private section bellow. Both at it used to be and as it now is without the comment (if I am indeed understanding you correctly) – neither work.
I really don’t understand what I am meant to do? I’m not a person who codes, that is why I love Enfold, it allows idiots like me to build good sites without having to,
regards Charl
February 11, 2019 at 9:01 pm #1065668Hi Charl,
The token expired, please update it, so that we can check again.
Best regards,
VictoriaFebruary 12, 2019 at 4:49 am #1065768Hi Victoria
The link is bellow, many thanks.
regards CharlFebruary 13, 2019 at 12:11 pm #1066448Hi,
The code or filter is still commented out. You should remove the opening comment tag /* and the closing */. I tried to edit it from the Appearance > Editor panel, but I’m getting errors.
Best regards,
IsmaelFebruary 13, 2019 at 2:08 pm #1066487Hi Ismael
I also get errors, which is why I thought I’d misunderstood what to do about “comments” – what do you sugest I do if I can’t correct the code so that it works? The thing that confuses me is everything was working fine last year with exactly this code.
regards Charl
February 14, 2019 at 5:18 am #1066777Hi,
I get errors editing the files, so I can’t remove the comment line, but the filter itself should work as is. Could we access the file server? Please provide the FTP details in the private field.
Best regards,
IsmaelFebruary 14, 2019 at 5:38 pm #1067078Thanks Ismael
I have added the ftp details bellow, just make sure you choose the relevant site.
regards Charl
February 18, 2019 at 6:05 am #1068126Hi,
Thanks for the update.
There’s a lot of directories in there and I’m not sure which one is the actual site. What is the name of the folder?
Best regards,
IsmaelFebruary 18, 2019 at 9:06 am #1068193Hi Ismael
I’ve added the folder name in the private section.
cheers CharlFebruary 19, 2019 at 8:03 am #1068798Hi,
Thanks for the update.
I enabled the code in the functions.php file and edited it a bit. It works properly now.
Best regards,
IsmaelFebruary 19, 2019 at 9:02 am #1068825Thanks so much Ismael
Much appreciated, what do you mean by enabled – just curious for next time?
regards Charl
February 19, 2019 at 1:09 pm #1068932Hi Charl,
Ismael removed the characters that were marking the code as commented out.
Glad we could help :)
If you need further assistance please let us know.
Best regards,
VictoriaFebruary 20, 2019 at 9:01 am #1069314thanks Victoria
-
AuthorPosts
- You must be logged in to reply to this topic.