I am making a WordPress theme and I am using the featured image / thumbnail feature.
<?php if(has_post_thumbnail()) { the_post_thumbnail('related-post-thumbnail'); } else {
echo '<img src="'.get_bloginfo("template_url").'/images/no-thumbnail-small.png" />'; } ?>
The only problem is whenever someone hovers over the image, there is a title attribute. How can I remove this without going into the WP files outside of my theme files? Thanks!
dikkevandale
Member
Posted 1 year ago #
I would like to know this too!
Frustrating, because the image titles are often like 8a3rha3a3ja3r.jpg and I don't have time to rename all those images. So I would like to use the_title(); for image titles.
Any solution yet?
Sadly, not yet. I think you have to edit the files to get this.
dikkevandale
Member
Posted 1 year ago #
Ok, I will share if I find something :) I don't want to mess with the core files.
Alright, same. Thank you :)
themolitor
Member
Posted 1 year ago #
<?php the_post_thumbnail('related-post-thumbnail',array('title' => "")); ?>
More info here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail
@themolitor
Thanks! Worked for me also. (Using WP 3.2.1)