Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using the_post_thumbnail to display a specific thumbnail size. The function outputs an 'alt=' tag with the description of the attachment. Is it possible to clear the value in the ouput? So it'll display alt=""?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If you look here: you will see that you can change the alt. You have to add an array with the value for the alt in the second parameter like so: <?php the_post_thumbnail('thumbnail', array( 'alt' => false )); ?>

share|improve this answer
Thank you, works perfectly! – Squrler Dec 19 '11 at 1:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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