Viewing 1 post (of 1 total)
  • Author
    Posts
  • #210299

    This may have already been updated, but I had to hack the theme to add an alt image to the logo. Here is the code I changed:

    Change this core code on theme update:

    Theme/framework/php/function-set-avia-frontend.php

    Line 416 to:

    
    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")
    	{
    		$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($logo = avia_get_option('logo'))
    		{
    			 $logo = "<img src='{$logo}' alt='{$alt}' title='{$alt}'/>";
    			 $logo = "<$headline_type class='logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>";
    		}
    		else
    		{
    			$logo = get_bloginfo('name');
    			if($use_image) $logo = "<img src='{$use_image}' alt='{$alt}' title='{$alt}'/>";
    			$logo = "<$headline_type class='logo bg-logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>";
    		}
    
    		return $logo;
    	}
    }
    

    Let me know if this has been fixed so I can remove my hack- thanks!

Viewing 1 post (of 1 total)
  • The topic ‘Code Suggestion: Alt Image to Logo’ is closed to new replies.