How to create a widget like this?
Your question is a little short on detail, but let’s suppose you have retrieved the posts using wp_query and are looping through it like this: $the_query = new WP_Query( $args ); if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); STUFF } wp_reset_postdata(); } In the position of STUFF you want to distinguish … Read more