Thumbnails support for WP4
-
Hi.
Please update display_msp_posts function to display thumbnails instead of default images:
+++ switch_to_blog($blog_id);
if( !empty( $criteria[“thumbnail”] ) ) {
if( has_post_thumbnail($post_id) ) {
$output .= get_the_post_thumbnail( $post_id, array(100, 100) );
} else {
$output .= ‘<img class=”msp-thumbnail” src=”‘ . plugins_url( “assets/msp_noimg.jpg”, __FILE__ ) . ‘” />’;
}
}$output .= ‘<div class=”msp-content”>‘ . $post_title . ‘‘;
if( !empty( $criteria[“excerpt”] ) ) {
$output .= ‘<p>’ . get_the_excerpt() . ‘</p>’;
}$output .= ‘</div>’;
+++ restore_current_blog();
Thanks.
- The topic ‘Thumbnails support for WP4’ is closed to new replies.