Title: Widget
Last modified: August 20, 2016

---

# Widget

 *  Resolved [el-zorro](https://wordpress.org/support/users/el-zorro-1/)
 * (@el-zorro-1)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/widget-31/)
 * Is there a way to to add a widget that would contain the secondary image?
 * I’m sure this can be done just pasting the PHP that (mentioned in the installation)
   into something like the Enhanced Text Widget but I was wondering if maybe there
   was a more streamlined way…
 * [http://wordpress.org/extend/plugins/multiple-post-thumbnails/](http://wordpress.org/extend/plugins/multiple-post-thumbnails/)

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

 *  Plugin Author [Chris Scott](https://wordpress.org/support/users/chrisscott/)
 * (@chrisscott)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/widget-31/#post-3517923)
 * There isn’t a widget currently, but one could be added–I just need to think of
   how one would work. Open to suggestions.
 * In the mean time, your solution would be a good workaround.
 *  Thread Starter [el-zorro](https://wordpress.org/support/users/el-zorro-1/)
 * (@el-zorro-1)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/widget-31/#post-3517943)
 * It’s no biggie.
 * workaround is fine. I wouldn’t waste any brain cycles..
 *  [felixlvh](https://wordpress.org/support/users/felixlvh/)
 * (@felixlvh)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/widget-31/#post-3517963)
 * I’m keen to make this works for widget. My current widget code as below how can
   i display the second and third featured posts image?
 *     ```
       if ($r->have_posts() ) {
       		$output = '<div class="recent-posts-wrap">';
       		$output .= '<ul class="posts-list">';
       		while ( $r->have_posts() ) {
       			$r->the_post();
       			$output .= '<li class="clearfix">';
       			if ( $thumbnail != 'false' ) {
       				$output .= '<a class="thumbnail" href="' . get_permalink() . '" title="' . get_the_title() . '">';
       				if ( has_post_thumbnail() ) {
       					$output .= get_the_post_thumbnail( get_the_ID(), array( 105, 105 ),array( 'title' => get_the_title(), 'alt' => get_the_title() ) );
       				} else {
       					$output .= '<img src="' . THEME_IMAGES . '/post-thumbnail.png" width="105" height="105" title="' . get_the_title() . '" alt="' . get_the_title() . '"/>';
       				}
       				$output .= '</a>';
       			}
       			$output .= '<div class="post-extra-info">';
       			$title = get_the_title();
       			$output .= '<a class="post-title" href="' . get_permalink() . '" title="' . get_the_title() . '" rel="bookmark">' . $title . '</a>';
       			if ( in_array( 'time', $extra ) ) {
       				$output .= '<time datetime="' . get_the_time( 'Y-m-d' ) . '">' . get_the_date() . '</time>';
       			}
       			if ( in_array( 'desc', $extra ) ) {
       				global $post;
       				$excerpt = $post->post_excerpt;
       				$excerpt = apply_filters( 'get_the_excerpt', $excerpt );
       				$output .= '<p>' . wp_html_excerpt( $excerpt, $desc_length ) . '...</p>';
       			}
       			$output .= '</div>';
       			$output .= '</li>';
       		}
       		$output .= '</ul>';
       		$output .= '</div>';
       	}
       ```
   

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

The topic ‘Widget’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multiple-post-thumbnails_d94965.svg)
 * [Multiple Post Thumbnails](https://wordpress.org/plugins/multiple-post-thumbnails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-post-thumbnails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-post-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-post-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-post-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-post-thumbnails/reviews/)

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 3 replies
 * 3 participants
 * Last reply from: [felixlvh](https://wordpress.org/support/users/felixlvh/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/widget-31/#post-3517963)
 * Status: resolved