Title: post_thumbnail_html filter
Last modified: August 30, 2016

---

# post_thumbnail_html filter

 *  Resolved [tdmalone](https://wordpress.org/support/users/tdmalone/)
 * (@tdmalone)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/post_thumbnail_html-filter-1/)
 * Hey guys!
 * Thanks for the awesome plugin. Just a quick question, would it be possible for
   you to integrate the post_thumbnail_html filter? I’m using this filter to make
   some custom changes to thumbnail display and this plugin isn’t taking them into
   account due to the custom thumbnail functions being used.
 * Thanks muchly for your consideration.
 * [https://wordpress.org/plugins/recent-posts-widget-extended/](https://wordpress.org/plugins/recent-posts-widget-extended/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [satrya](https://wordpress.org/support/users/satrya/)
 * (@satrya)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/post_thumbnail_html-filter-1/#post-6391937)
 * I’m using the standard `get_the_post_thumbnail()` function actually, it should
   work out of the box.
 *  Thread Starter [tdmalone](https://wordpress.org/support/users/tdmalone/)
 * (@tdmalone)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/post_thumbnail_html-filter-1/#post-6391979)
 * Hi there Satrya, thanks for replying and sorry for my delay in getting back to
   you!
 * In `includes/functions.php` the plugin uses `get_the_post_thumbnail()` once, 
   but this seems to only apply in some circumstances (related to use of the custom
   function `rpwe_resize()`). There is alternative code (line 131 of functions.php
   in the latest version of the plugin) which creates an `<img>` tag directly when`
   rpwe_resize()` returns something – which in my case, it is.
 * I was able to get around this by wrapping line 131 in an `apply_filters()` call
   to `post_thumbnail_html`, sending through additional arguments `get_the_ID()`,`
   $thumb_id` and `"thumbnail"`.
 * I’m not a plugin developer so I’m not sure if I have followed best practice for
   this but it is working for my needs at the moment – until I update the plugin
   of course 😉
 * I’m not sure if I’ve missed something or am understanding it incorrectly but 
   if it is possible for you to filter that output where you’re creating the `<img
   >` tag I would be really appreciative!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘post_thumbnail_html filter’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/recent-posts-widget-extended_3384ca.
   svg)
 * [Recent Posts Widget Extended](https://wordpress.org/plugins/recent-posts-widget-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/recent-posts-widget-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/recent-posts-widget-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/recent-posts-widget-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/recent-posts-widget-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/recent-posts-widget-extended/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [tdmalone](https://wordpress.org/support/users/tdmalone/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/post_thumbnail_html-filter-1/#post-6391979)
 * Status: resolved