I’m using a custom header in my theme. My aim is to add an alt attribute to my custom header img element. My img element so far looks like this:

<img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="" />

How can I get the alt text of the custom header image?

Read more here: How to get the custom header image’s alt text?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: