Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #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

    #1060589

    try 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;
    }
    #1060700

    Hi,

    Thanks @Guenni for sharing the solution.

    Let us knwo if you need any further assistance with this sissue.

    Best regards,
    Vinay

    #1061580

    Thanks 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

    #1061669

    Hi,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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,
    Vinay

    #1061937

    Another 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:// (Purchase code hidden if logged out) ";
        }
        return $header; 
    }

    that is the logo you put in on Enfold (Child) – Header – Transparency Options : “Transparency Logo”

    #1062289

    @guenni007 thanks for your reply, there are no transparent headers or logos on the site
    @vinay I have sent you the link, many thanks

    #1062499

    Hi charl,

    There is no login information or token in the thread, please try posting it again.

    Best regards,
    Rikard

    #1062576

    Hi Rikard
    Sorry, no idea what went wrong, try now, I’ve sent the link via private content.
    cheers Charl

    #1064196

    Hi Charl,

    Best regards,
    Victoria

    #1064423

    Hi 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

    #1064785

    Hi 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,
    Victoria

    #1065358

    Hi 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

    #1065668

    Hi Charl,

    The token expired, please update it, so that we can check again.

    Best regards,
    Victoria

    #1065768

    Hi Victoria
    The link is bellow, many thanks.
    regards Charl

    #1066448

    Hi,

    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,
    Ismael

    #1066487

    Hi 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

    #1066777

    Hi,

    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,
    Ismael

    #1067078

    Thanks Ismael

    I have added the ftp details bellow, just make sure you choose the relevant site.

    regards Charl

    #1068126

    Hi,

    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,
    Ismael

    #1068193

    Hi Ismael
    I’ve added the folder name in the private section.
    cheers Charl

    #1068798

    Hi,

    Thanks for the update.

    I enabled the code in the functions.php file and edited it a bit. It works properly now.

    Best regards,
    Ismael

    #1068825

    Thanks so much Ismael

    Much appreciated, what do you mean by enabled – just curious for next time?

    regards Charl

    #1068932

    Hi 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,
    Victoria

    #1069314

    thanks Victoria

Viewing 25 posts - 1 through 25 (of 25 total)

You must be logged in to reply to this topic.