WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 down vote accepted

If you look here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail 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.