Title: Bug Code Fix Here
Last modified: August 22, 2016

---

# Bug Code Fix Here

 *  [TheRiz](https://wordpress.org/support/users/theriz/)
 * (@theriz)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/bug-code-fix-here/)
 * I was having a problem with this widget and the subsidiary widgets in my theme.
   The theme author found a bug in the plugin. Basically, it’s outputting an image
   instead of returning it for later use.
 * This:
 *     ```
       // If no post thumbnail found, check if Get The Image plugin exist and display the image.
       elseif ( function_exists( 'get_the_image' ) ) :
       	$html .= get_the_image( array(
       		'height'        => (int) $args['thumb_height'],
       		'width'         => (int) $args['thumb_width'],
       		'image_class'   => esc_attr( $args['thumb_align'] ) . ' rpwe-thumb get-the-image',
       		'image_scan'    => true,
       		'default_image' => esc_url( $args['thumb_default'] )
       ) );
       ```
   
 * Should be this:
 *     ```
       // If no post thumbnail found, check if Get The Image plugin exist and display the image.
       elseif ( function_exists( 'get_the_image' ) ) :
       	$html .= get_the_image( array(
       		'height'        => (int) $args['thumb_height'],
       		'width'         => (int) $args['thumb_width'],
       		'image_class'   => esc_attr( $args['thumb_align'] ) . ' rpwe-thumb get-the-image',
       		'image_scan'    => true,
       		'default_image' => esc_url( $args['thumb_default'] ),
       		'echo' => false
       ) );
       ```
   
 * The widget is outputting an image *outside* of the widget container. This means
   that the theme loses a lot of control because it expects widget containers to
   contain the entirety of the widget. That way, things can be appropriately positioned.
 * [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)

 *  [becky.absolute](https://wordpress.org/support/users/beckyabsolute/)
 * (@beckyabsolute)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/bug-code-fix-here/#post-5321181)
 * I am having the exact same issue on one of my sites. I was about to post a new
   thread about it, but you beat me too it.
 * The **Get the Image** plugin echoes the image by default in the **get_the_image()**
   function. Adding `'echo' => false` to the options array passed to it fixes things.
 * I’m hoping the plugin author sees this fairly soon and addresses things with 
   a bug fix. I don’t remember if I used this plugin on another site or not.
 *  Thread Starter [TheRiz](https://wordpress.org/support/users/theriz/)
 * (@theriz)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/bug-code-fix-here/#post-5321266)
 * Any update here?

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

The topic ‘Bug Code Fix Here’ 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: [TheRiz](https://wordpress.org/support/users/theriz/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/bug-code-fix-here/#post-5321266)
 * Status: not resolved