最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ALT attribute in menu images

programmeradmin2浏览0评论

I have a few missing attributes in my WP Theme.

I found images in header.php in example:

class="articles"><img src="<?php echo get_template_directory_uri(); ?>/images/topmenu/ikona_artykuly.png" />

ikona_artykuly.png has missing attribute.

Can I add alt attribute in this place?

class="articles"><img src="<?php echo get_template_directory_uri(); ?>/images/topmenu/ikona_artykuly.png" alt="Artykuly" />

Will it be ok, or this is not the right place to add alt attribute?

Can you help?

Regards, Marceli

I have a few missing attributes in my WP Theme.

I found images in header.php in example:

class="articles"><img src="<?php echo get_template_directory_uri(); ?>/images/topmenu/ikona_artykuly.png" />

ikona_artykuly.png has missing attribute.

Can I add alt attribute in this place?

class="articles"><img src="<?php echo get_template_directory_uri(); ?>/images/topmenu/ikona_artykuly.png" alt="Artykuly" />

Will it be ok, or this is not the right place to add alt attribute?

Can you help?

Regards, Marceli

Share Improve this question edited Dec 29, 2019 at 15:54 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Dec 29, 2019 at 15:30 wordheawordhea 1
Add a comment  | 

1 Answer 1

Reset to default 0

Yes, you can add the alt attribute. But there is a catch.

When the theme is updated, all your changes or modification to the theme will be lost.

It is recommended to make those changes in the child theme. You can learn more about WordPress child theme here

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论