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

    Refering to this
    https://kriesi.at/support/topic/different-logo-per-page-with-advanced-custom-fields/

    How does this work?
    I added the code but where do I go to change the logo for each page.?

    Thanks

    #671713

    Oh am I right in saying

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if(is_page(21) )      THIS Should be my page ID
        {
        $logo = "http://www.domain.com/wp-content/uploads/logo.jpg";  THIS should be a link to new logo
        }
        return $logo;
    }

    So then do I repeat ALL code above for each page ID i want a new logo on?? Or can I add more code within here above??

    #671731

    ok I did manage to get one logo on one page working, but how do I change this to work with different logos on each page??

    • This reply was modified 8 years, 3 months ago by wealthyone.
    #672481

    Hi,

    Thank you for using Enfold.

    This should work for multiple pages:

    add_filter('avf_logo','av_change_logo');
    function av_change_logo($logo)
    {
        if( is_page(21) ) {
    		$logo = "http://www.domain.com/wp-content/uploads/logoforpage21.jpg";  
    	} elseif ( is_page(22) ) {
    		$logo = "http://www.domain.com/wp-content/uploads/logoforpage22.jpg";  
    	} elseif ( is_page(23) )  {
    		$logo = "http://www.domain.com/wp-content/uploads/logoforpage23.jpg";  
    	}
    
        return $logo;
    }

    Best regards,
    Ismael

    #672510

    Magic..
    I love enfold..
    The more I use it the more I like it..
    wont use any other theme now..

    Thanks

    #672977

    Hi,

    Glad we could help and thanks for the kind words :-)

    Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Different Logo on different pages’ is closed to new replies.