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

| improve this question | | | | |
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

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.