How can I add alt text to my website logo?



  • I never had a site before where I didn’t have alt text for the logo. Where is the setting hiding, please?

    Thanks as always!



  • If you are using the default theme than its already using your shop name as alt tag.
    If you are using different theme than you should look inside header.tpl file



  • @yaniv14 said in How can I add alt text to my website logo?:

    If you are using different theme than you should look inside header.tpl file

    It already says my website name “Always Paws” but I want to add more to it.

    I looked in my transformer theme header.tpl and searched for “Always Paws” but it isn’t found and I don’t see where to change it.

    Should I post the code?



  • alt text is in Seo only effective it it just tels what we see, so if we see a car with 3 wheels the alt text should be “car with 3 wheels” or something like that. So its very important the alt text in our product images is correct, when people search the images in google they get the right content. Sometimes when you try a search phrase in google images you get the most strange results, so its important only to put short, and correct information.

    I can imagine you want to put all the information about your shop :) But keep clean and stay clean in that way


  • Global Moderator

    This post is deleted!


  • Like @Traumflug said, you should look for something like: alt="{$shop_name|escape:‘html’:‘UTF-8’}" inside <img> tag



  • @traumflug said in How can I add alt text to my website logo?:

    I looked in my transformer theme header.tpl and searched for “Always Paws” but it isn’t found and I don’t see where to change it.

    Watch out for $shop_name. You can replace something like title="{$shop_name|escape:'html':'UTF-8'}" with title="My awesome dog shop"

    @Traumflug My hero! Thank you! It’s so nice to get what I want once in a while.

    0_1505139619206_Always Paws logo with alt text.jpg



  • @baarssen said in How can I add alt text to my website logo?:

    alt text is in Seo only effective it it just tels what we see, so if we see a car with 3 wheels the alt text should be “car with 3 wheels” or something like that. So its very important the alt text in our product images is correct, when people search the images in google they get the right content. Sometimes when you try a search phrase in google images you get the most strange results, so its important only to put short, and correct information.

    I can imagine you want to put all the information about your shop :) But keep clean and stay clean in that way

    Thank you for your advice @Baarssen! I kept it nice and short. :)



  • @yaniv14 I searched for what @Traumflug showed me and found it, but I also searched for your suggestion but it wasn’t found. This coding is tricky business! If I know where to find the code in the first place, it’s easy for me to copy and paste, but that’s as far as my “expertise” goes. :)



  • Whats the purpose of the alt text? this is only visible when hovering with the mouse. and I think it has no effect on seo.
    If its just for adding a sub title text/slogan for your logo than make it visible all the time by modifying your logo or by adding a line of text under the image.
    If you looking for image seo than you should do alt/title at the <img> tag.



  • I want people to see it when they’re wondering where to go next because I don’t want them to confuse me with pet sellers. As far as for image SEO, I may as well add that.

    Here is part of the code. Where do I add the alt/title for the <img> tag, please?



  • col-md-{$sttheme.logo_width}">
    <div id=“header_logo_inner”>
    <a id=“header_logo” href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title=“Always Paws Dogs Supplies and Dog Lovers Jewelry”>
    <img class=“logo replace-2x” src="{$logo_url}" {if isset($sttheme.retina_logo) && $sttheme.retina_logo} data-2x="{$link->getMediaLink(“$smarty.const._MODULE_DIR_stthemeeditor/$sttheme.retina_logo|escape:'html':'UTF-8'”)}"{/if} alt="{$shop_name|escape:‘html’:‘UTF-8’}"



  • What took so long to post the code was this popped up, probably courtesy of Michael Dekker! :)

    0_1505140926924_giphy's.png



  • at the end of the code you posted:
    alt="{$shop_name|escape:‘html’:‘UTF-8’}"

    {$shop_name|escape:‘html’:‘UTF-8’} = The name of your shop, what you have setup in the admin.

    You can do:
    alt="{$shop_name|escape:‘html’:‘UTF-8’} Dogs Supplies and Dog Lovers Jewelry"



  • @yaniv14 Now the code looks like the below. Is it correct, please?

    <div id=“header_logo_inner”>
    <a id=“header_logo” href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title=“Always Paws Dogs Supplies and Dog Lovers Jewelry”>
    <img class=“logo replace-2x” src="{$logo_url}" {if isset($sttheme.retina_logo) && $sttheme.retina_logo} data-2x="{$link->getMediaLink(“$smarty.const._MODULE_DIR_stthemeeditor/$sttheme.retina_logo|escape:‘html’:‘UTF-8’”)}"{/if}
    alt="{$shop_name|escape:‘html’:‘UTF-8’} Dogs Supplies and Dog Lovers Jewelry"



  • yes, but again this is for screen readers and for google image search.
    which mean that the image will be tagged by google with that text.
    I think that it will be more accurate to describe the image as “{$shop_name|escape:‘html’:‘UTF-8’} logo” like: Always Paws logo.
    I am no seo expert but I do know that image need to have a alt tag that describe the image in words.



  • I know what alt text is for. :) I keep trying to fix it but now it is not changing:

    <div id=“header_logo_inner”>
    <a id=“header_logo” href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title=“Always Paws Dogs Supplies and Dog Lovers Jewelry”>
    <img class=“logo replace-2x” src="{$logo_url}" {if isset($sttheme.retina_logo) && $sttheme.retina_logo} data-2x="{$link->getMediaLink(“$smarty.const._MODULE_DIR_stthemeeditor/$sttheme.retina_logo|escape:'html':'UTF-8'”)}"{/if} alt="{$shop_name|escape:‘html’:‘UTF-8’} Dogs Supplies and Dog Lovers Jewelry Shop Logo"



  • Maybe you need to clear template cache?



  • I reverted the header.tpl back to what it was so it just says “Always Paws”. Some ideas seem great at the time. Others not so much.


Log in to reply
 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.