Title: Ultimate Posts Widget Compatability
Last modified: August 21, 2016

---

# Ultimate Posts Widget Compatability

 *  [lcderus](https://wordpress.org/support/users/lcderus/)
 * (@lcderus)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/ultimate-posts-widget-compatability/)
 * Hi – I really love Featured video plus and am currently using it on my site bananalust
   dot com. I’ve installed Ultimate Posts widget [http://wordpress.org/plugins/ultimate-posts-widget/](http://wordpress.org/plugins/ultimate-posts-widget/)
   and already gone through the trouble of skinning it.
 * I use the widget to display posts but video is not working with it. This isn’t
   a theme issue since when I use Flexible Posts Widget the video does display on
   the homepage (ie I can play vid directly in homepage).
 * Here is the code I pulled from my functions.php file
 *     ```
       foreach($post_type as $post)
       	        {
                       $format = get_post_format($post->ID);
                       if (get_the_post_thumbnail( $post->ID, 'thumbnail' ))
                       {
                           $image = get_the_post_thumbnail( $post->ID, 'thumbnail' );
                       }
                       else
                       {
                           if ($format == 'video')
                               $image = "<i class='icon icon-film'></i>";
                           elseif ($format == 'image' || $format == 'gallery')
                               $image = "<i class='icon icon-picture'></i>";
                           else
                               $image = "<i class='icon-info-sign'></i>";
                       }
       ```
   
 * And here is the code from Ultimate Posts Widget
 *     ```
       $r = new WP_Query( $args );
   
       			if ( $r->have_posts() ) :
   
       				echo '<ul>';
   
       				while ( $r->have_posts() ) : $r->the_post();
   
       					?>
   
       					<li class="<?php echo ($post->ID == $current_post_id && is_single())?'current-post-item':'' ?>">
   
       						<?php
       							if ( function_exists('the_post_thumbnail') &&
       									 current_theme_supports("post-thumbnails") &&
       									 $instance["show_thumbnail"] &&
       									 has_post_thumbnail() ) :
       							$thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'large');
       							$plugin_dir = 'ultimate-posts-widget';
       						?>
       ```
   
 * Do you have any insight or suggestions into how I should modify the Ultimate 
   Posts Widget file in order to make it compatible with your plugin? Thanks very
   much for your help, Leah
 * [http://wordpress.org/plugins/featured-video-plus/](http://wordpress.org/plugins/featured-video-plus/)
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_

The topic ‘Ultimate Posts Widget Compatability’ is closed to new replies.

 * ![](https://ps.w.org/featured-video-plus/assets/icon.svg?rev=1170997)
 * [Featured Video Plus](https://wordpress.org/plugins/featured-video-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/featured-video-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/featured-video-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/featured-video-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/featured-video-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/featured-video-plus/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [lcderus](https://wordpress.org/support/users/lcderus/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/ultimate-posts-widget-compatability/)
 * Status: not resolved