Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1464276

    Hi,

    I was able to alter PHP to change logo per page id but only works when scroll down page. Is there a css function that i can hide the logo that appears on certain page id’s? Thanks!

    #1464323

    Hey lobstahhhhhhh,
    It sounds like your function is only changing the standard logo and not the transparent logo, typically these are two different logos.
    For the standard logo use this function:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if(is_page(206) )
        {	
        $logo = "https://kriesi.at/themes/enfold-business-flat/wp-content/uploads/sites/43/2014/08/logo_flat_portfolio.png";
        }
        return $logo;
    }

    for the transparent logo use this function:

    function av_change_alt_logo_img($header){
        if(is_page(206) ){
            $header['header_replacement_logo'] = "https://kriesi.at/themes/enfold-startup/wp-content/uploads/sites/47/2015/02/logo_coming_soon.png";
        }
        return $header; 
    }
    add_filter('avf_header_setting_filter','av_change_alt_logo_img');

    If you want both to be the same image, you can also do that.

    Best regards,
    Mike

    #1464794

    Thank you so much!
    How do I make it so both of these logos point to a specific page on the site (not the home page)?

    #1464810

    Hi,
    You will want to change the page ID in the code above: if(is_page(206)
    so change “206” to your page ID

    Best regards,
    Mike

    #1465072

    Thank you! I am sorry, I did not explain properly.

    In the previous posts on this thread, you showed me how to put two different logos on same website. We have a market with two different locations. The page 206 in your example is the page ID’s where these secondary logos show.

    The code you gave me was great, but I need to have those logos direct to a page other than the home page, when you click on them. How do I do this? Thanks!

    #1465104

    Hi,
    Ok, so you also want to change the logo link on a certain page.
    Add this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    // to change the logo link
    add_filter('avf_logo_link','av_change_logo_link');
    function av_change_logo_link($link)
    {
        if(is_page(206) )
        {
        $link = "https://your-new-link.com";
        }
        return $link;
    }

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    Adjust the page ID and link to suit.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.