Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #365316
    #365543

    Hey camtay!

    Please try the code as following

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if(is_page(3548,4176,4306,3546) )
        {
        $logo = "http://nutsandboltsspeedtraining.com/wp-content/uploads/2014/11/Spicy-Presentations-by-Lia-Logo.png";
        }
        return $logo;
    }

    Regards,
    Yigit

    #365605

    Hi Yigit,
    I inserted the code above but it’s only working for the first page (3548), the others still have the other logo.
    Thanks,
    Camille

    #365819

    Hi!

    You need to pass the ids to an array:

    is_page( array(3548,4176,4306,3546 ) )
    

    Cheers!
    Ismael

    #365869

    Just tried that and got this error – Parse error: syntax error, unexpected ‘{‘ in /home/content/34/11243234/html/wp-content/themes/enfold-child/functions.php on line 71

    Here’s the code I used, line 71 is bolded (it’s the second ‘{‘):

    add_filter(‘avf_logo’,’av_change_logo’);
    function av_change_logo($logo)
    {
    if(is_page(array(3548,4176,4306,3546)))
    {
    $logo = “http://nutsandboltsspeedtraining.com/wp-content/uploads/2014/11/Spicy-Presentations-by-Lia-Logo.png”;
    }
    return $logo;
    }

    #366522

    Hi!

    I tested this on my installation and it works fine.

    Please use this:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
    if(is_page(array(17,12)))
    {
    $logo = "http://nutsandboltsspeedtraining.com/wp-content/uploads/2014/11/Spicy-Presentations-by-Lia-Logo.png";
    }
    return $logo;
    }

    Replace the ids.

    Best regards,
    Ismael

    #367157

    Hi Ismael,
    That worked, thank you so much! And so if I have a logo url redirect after that, how do I add those same page IDs to the custom post? Right now I have this:

    add_filter(‘avf_logo_link’, ‘avf_redirect_logo_link’);
    function avf_redirect_logo_link($link) {
    if(is_singular(‘spicypresentations’))
    $link = ‘http://www.nutsandboltsspeedtraining.com/spicypresentations/’;
    return $link;
    }

    I want to add those 3 pages to this function.

    Thanks!

    #367706

    Hey!

    Try to replace the code with this:

    add_filter('avf_logo_link', 'avf_redirect_logo_link');
    function avf_redirect_logo_link($link) {
    if(is_singular('spicypresentations') || is_page(array(12,17)))
    $link = 'http://www.nutsandboltsspeedtraining.com/spicypresentations/';
    return $link;
    }

    Regards,
    Ismael

    #369882

    Perfect, thanks Ismael!!!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Different Main Navigation Menu and Logo for Custom Post Type? – Fix?’ is closed to new replies.