Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #402985
    #403178

    Hey!

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

    add_filter( 'avf_logo_headline',  'change_logo_to_h1', 10);
    function change_logo_to_h1() {
    	return "h1";
    }

    Cheers!
    Josue

    #403254

    Thank you Josue! It is works. But one more question, please! :) How I can add and rel=”home” in:

    <a href="/" rel="home">
          <img src="logo.png" alt="Brand" />
    #403733

    Hi!

    Use this code instead:

    add_filter( 'avf_logo_final_output',  'change_logo', 10, 6);
    function change_logo($logo, $use_image, $headline_type, $sub, $alt, $link) {
    	$logo = "<h1 class='logo'><a href='".$link."' rel='home'>".$logo."$sub</a></h1>";
    	return $logo;
    }

    Best regards,
    Josue

    #403810

    It is change, but position of the logo misaligned in site. It is ugly :(

    https://www.dropbox.com/s/pyngkfwb8zutgpy/logo-problem.jpg?dl=0

    #403887

    Hi,

    Can you post the link to your website please?

    Regards,
    Josue

    #403889

    Yes, site is gigadesign.bg. But now I remove last code.

    #403896

    Hi!

    Remove the previous codes i suggested and put the following in your child theme functions.php:

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

    Best regards,
    Josue

    #403898

    Man, you are king! It is works fine.

    Thank you for help!

    #403904

    You are welcome, glad to help :)

    Regards,
    Josue

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Logo in H1 tag Syntax’ is closed to new replies.