Tagged: ,

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

    Hey!

    Refer to this article:
    http://kriesi.at/documentation/enfold/ (Purchase code hidden if logged out) -some-pages/

    Best regards,
    Josue

    #351862

    Hi Josue,
    Thanks for your reply! But I actually want the logo to be the same image, I just want it so that when you click on it, it goes to a custom URL, instead of the Home URL.
    I notice that in the framework / php / function-set-avia-frontend.php file, there is the following code:

    if(!function_exists(‘avia_logo’))
    {
    /**
    * return the logo of the theme. if a logo was uploaded and set at the backend options panel display it
    * otherwise display the logo file linked in the css file for the .bg-logo class
    * @return string the logo + url
    */
    function avia_logo($use_image = “”, $sub = “”, $headline_type = “h1”, $dimension = “”)
    {
    $use_image = apply_filters(‘avf_logo’, $use_image);
    $headline_type = apply_filters(‘avf_logo_headline’, $headline_type);
    $sub = apply_filters(‘avf_logo_subtext’, $sub);
    $alt = apply_filters(‘avf_logo_alt’, get_bloginfo(‘name’));
    $link = apply_filters(‘avf_logo_link’, home_url(‘/’));

    if($sub) $sub = “<span class=’subtext’>$sub</span>”;
    if($dimension === true) $dimension = “height=’100′ width=’300′”; //basically just for better page speed ranking :P

    if($logo = avia_get_option(‘logo’))
    {
    $logo = apply_filters(‘avf_logo’, $logo);
    if(is_numeric($logo)){ $logo = wp_get_attachment_image_src($logo, ‘full’); $logo = $logo[0]; }
    $logo = “{$alt}“;
    $logo = “<$headline_type class=’logo’>“.$logo.”$sub</$headline_type>”;
    }
    else
    {
    $logo = get_bloginfo(‘name’);
    if($use_image) $logo = “{$alt}“;
    $logo = “<$headline_type class=’logo bg-logo’>“.$logo.”$sub</$headline_type>”;
    }

    $logo = apply_filters(‘avf_logo_final_output’, $logo, $use_image, $headline_type, $sub, $alt, $link);

    return $logo;
    }
    }

    Is there something here that I can change to make it go from home_url to a custom URL?
    Thanks!

    #351883

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_filter('avf_logo_link', 'avf_redirect_logo_link');
    
    function avf_redirect_logo_link($link) {
    	$link = 'http://www.google.com';
    	return $link;
    }

    Cheers!
    Josue

    #351905

    That worked! Fantastic, thank you Josue!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Custom URL for Logo’ is closed to new replies.