Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #694376

    I saw this code while looking into a solution to have the logo and link to change based on the post type you are viewing.

    I would like to change the home logo and link while you a viewing a custom post type to have a different logo and link something like – site.com/custom-post-type.

    Is there a way to use this code and change the link as well?

    add_filter(‘avf_logo’,’av_change_logo’);
    function av_change_logo($logo)
    {
    if(is_tax(‘portfolio_entries’,’south-canterbury-past-issues’) )
    {
    $logo = “http://kriesi.at/wp-content/themes/kriesi/images/logo.png”;
    }
    return $logo;
    }

    Thanks in advance.

    #694715

    Hey frankster1234,

    Try adding this code as well:

    
    add_filter('avf_logo','av_change_logo_url');
    
    function av_change_logo_url($url)
    {
        if(is_tax(‘portfolio_entries’,’south-canterbury-past-issues’))
        {
            $url = "http://link.to/img.png";
        }
    
        return $url; 
    
    }

    Best regards,
    Jordan

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