Easily allows you to designate posts, pages, attachments and custom post types as featured.
This is not the same as sticky posts. Sticky functionality can only be applied to the core 'post' post type. More information on why
This snippet of code will fetch the 10 most recent posts that are featured.
<?php $featured_posts = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 10, 'tax_query' => array( array( 'taxonomy' => 'pts_feature_tax', 'field' => 'slug', 'terms' => array( 'featured' ), ) ) ) ); if ( $featured_posts->have_posts() ) : while ( $featured_posts->have_posts() ) : $featured_posts->the_post(); //output featured posts here endwhile; endif; ?>
Requires: 3.1.0 or higher
Compatible up to: 4.3.1
Last Updated: 2015-9-25
Active Installs: 300+
Got something to say? Need help?