 
	
		
		
		
		
			
- 
		AuthorPosts
- 
		
			
				
June 19, 2014 at 8:33 am #281035Hi! 
 I found this:
 https://kriesi.at/support/topic/header-with-different-logos/
 How can I have different logos on “woocommerce”, “woocommerce-page”, “blog” classes? On that pages we don’t have IDs…Best regards 
 D.June 19, 2014 at 9:33 am #281051Hey David! You can try using this conditional tags for WC pages: 
 http://docs.woothemes.com/document/conditional-tags/For the blogpage: 
 http://codex.wordpress.org/Conditional_Tags#The_Blog_PageBest regards, 
 JosueJune 19, 2014 at 9:47 am #281065Thanks Josue, 
 can you please tell me witch file I have to edit, to change the output logo? This one:
 framework/php/function-set-avia-frontend.phpHow can I change this function quickly? 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 :Pif($logo = avia_get_option(‘logo’)) 
 {
 $logo = apply_filters(‘avf_logo’, $logo);
 $logo = ““; 
 $logo = “<$headline_type class=’logo’>“.$logo.”$sub</$headline_type>”;
 }
 else
 {
 $logo = get_bloginfo(‘name’);
 if($use_image) $logo = ““; 
 $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; 
 }
 }June 19, 2014 at 9:52 am #281069Don’t edit that, try adding this at the very end of your theme functions.php file: function av_change_logo($logo, $use_image, $headline_type, $sub, $alt, $link){ if(is_front_page()){ $logo_url = "_LOGO_URL_"; } if(is_woocommerce()){ $logo_url = "_LOGO_URL_"; } if($dimension === true) $dimension = "height='100' width='300'"; if(empty($logo_url)) $logo_url = avia_get_option('logo'); $logo = "<img {$dimension} src='{$logo_url}' alt='{$alt}' />"; $logo = "<$headline_type class='logo bg-logo'><a href='".$link."'>".$logo."$sub</a></$headline_type>"; return $logo; }Change as needed. Cheers! 
 JosueJune 19, 2014 at 10:03 am #281085Hi Jouse, 
 I inserted the code in functions.php of my child theme! Under the Theme Options I have to remove the logo and leave it empty? For now doesn’t work for me.D. June 19, 2014 at 10:04 am #281087Sorry, forgot this line: add_filter('avf_logo_final_output', 'av_change_logo', 100, 6);Put it right below the other code. Best regards, 
 JosueJune 19, 2014 at 10:32 am #281107Hey Josue! 
 Thank you very much! Now it works perfectly!!Cheers 
 D.
- 
		AuthorPosts
- The topic ‘Header with different logos’ is closed to new replies.
