-
Closed
-
I would like to add an alt tag to my image in the header for SEO reasons. I have it in the image in the library but seems there is no attribute to it in the header.
Hi,
You can add in header.php line 177 and 179
Thank you
Sorry but I am new and/or paranoid about editing php.
So I would add something like this?
to line 177 and 179 below?
/*
<!– /.cart-contents –>
<?php endif;//if(!$woocommerce->cart->cart_contents_count): ?>
LINE 177
<!– /li.cart –>
LINE 179
<?php endif;//if($woocommerce_cart_link_main_nav): ?>
<!– /ul.woocommerce-menu –>
</span><!– /span .woocommerce-menu-holder –>
*/
Hi,
Please hire a developer to assist in this customization.
We can only provide assistance in customization that is possible using custom css.
You would require editing theme code to add alt tag to header image HTML code, it not possible to do this using custom css.
Thank you
Thanks but that is disappointing. I don’t know anything about building themes but the alt tag is basic SEO and should be included.
Hi,
You can open up header.php, find the following codes.
echo "<div class='header-logo-container clearfix'><a href=" . home_url() . "><img id='logo-image' class='img-responsive' src=" . $evolve_header_logo . " /></a></div>";
} else {
echo "<div class='header-logo-container'><a href=" . home_url() . "><img id='logo-image' class='img-responsive' src=" . $evolve_header_logo . " /></a></div>";
And add alt to the img tag..
echo "<div class='header-logo-container clearfix'><a href=" . home_url() . "><img id='logo-image' alt='logo' class='img-responsive' src=" . $evolve_header_logo . " /></a></div>";
} else {
echo "<div class='header-logo-container'><a href=" . home_url() . "><img id='logo-image' alt='logo' class='img-responsive' src=" . $evolve_header_logo . " /></a></div>";
Thank you
Thanks, I will try this.
You are welcome!
Thanks but it appears that did not work.
Hi,
That’s not possible.
You can look at the codes in header.php
That’s the code for logo.
If you have a cache plugin, clear your cache.
Please hire a developer is you require further assistance.
Thank you.
I have the same issue, i looked in the header.php in the editor and used the find function and nothing comes up. I am a bit surprised this is not standard to enter in an alt text for your header since its much needed for SEO. Any way to do it with updates that have been done since?
Also if theme updates and the changes are made. Does it wipe out the change?
I think this is an important issue that needs to be fixed
SEMRUSH is reporting it as a serious issue that should be addressed.
The topic How to add alt tag to logo in header evolve+ is closed to new replies