I am trying to show a thumbnail with a link to the actual post. The HTML I use is the following:
<?php the_post_image() ; ?>
In functions.php I have the following filter:
add_filter( 'post_image_html', 'my_post_image_html', 10, 3 ); function my_post_image_html( $html, $post_id, $post_image_id ); $html = '' . $html . ''; return $html; }
This code for the filter I got from Justin Tadlock's site. This works with regards to the link but I get a double 'title' setting. The code I end up with is the following:
<a href="http://nice2all.com/2009/12/07/yellow-rose/" title="Yellow Rose"><img width="150" height="150" src="http://nice2all.com/wp-content/uploads/2009/12/flower4-150x150.jpg" class="attachment-thumbnail wp-post-image" alt="" title="flower4" /></a>
The second 'title' (the one I do not want) overwrites the first one. Any assistance would be appreciated.