Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #442438

    I want to see a different logo depending on the page.

    I had added this code to helper-main-menu-php :

    global $post;

    if ( is_page(3279) || ‘3279’ == $post->post_parent || is_page(3342) || ‘3342’ == $post->post_parent || is_page(3345) || ‘3345’ == $post->post_parent || is_page(4096) || ‘4096’ == $post->post_parent || is_page(4109) || ‘4109’ == $post->post_parent || is_page(1167) || is_page(5169))

    {

    echo avia_logo(AVIA_BASE_URL.’../../uploads/2014/07/logo-CLCF-web-e1406472780943.png’, $addition, ‘strong’, true);

    }

    else

    {

    echo avia_logo(AVIA_BASE_URL.’../../uploads/2013/04/TCatCL-logo-transparent-small-resized.png’, $addition, ‘strong’, true);

    }

    This was working, but does not anymore. Can you advise? Has there been a theme update? logo-CLCF-web-e1406472780943.png is never displayed it is always TCatCL-logo-transparent-small-resized.png

    Thanks in advance.

    #442442

    Hi BSTECH!

    Please add following code to Functions.php file instead

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if(is_page(array(3279,3342,3345,4096,4109,1167,5169) ))
        {
        $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
        }
        return $logo;
    }

    Best regards,
    Yigit

    • This reply was modified 9 years, 6 months ago by Yigit.
    #442727

    Hi.

    We added the code to functions.php and got this error: unexpected ‘add_filter’ (T_STRING) in /homepages/9/d538204811/htdocs/clickandbuilds/Carrslane/wp-content/themes/enfold/functions.php on line 89

    Does it need to be added to a particular line?

    #443179

    Hey!

    No actually it should have worked fine. Do you mind creating a temporary admin login and posting it here privately?

    Best regards,
    Yigit

    #443191

    Thanks for getting back to me. It’s working now – there was a bracket missing on the code!

    This can be closed now.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Different logo depending on the page’ is closed to new replies.