The plugin displays a checkbox in the publish meta box to feature a post. The checkbox only appears on admin selected post types which can be selected in the Settings->Writing screen.
When a post is designated as featured:
- It receives ‘featured’ and ‘featured-$posttype’ classes via the post_class filter.
- Shows featured posts as such in the post type’s admin screen
- Assigns a post a hidden taxonomy term (featured) that can easily be queried.
Note: For the plugin to work on attachments, you must be using 3.5 or above. All other features will work on 3.1.0 and up.
- Upload the plugin folder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Navigate to the Settings->Writing section and select the post types you would like to have the featured abilities.
- Isn’t this the same as sticky posts?
This is not the same as sticky posts. Sticky functionality can only be applied to the core ‘post’ post type. More information on why
- How do I find just my featured posts?
This snippet of code will fetch the 10 most recent posts that are featured.
‘posts_per_page’ => 10,
‘tax_query’ => 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
Contributors & Developers
“Post Type Spotlight” is open source software. The following people have contributed to this plugin.Contributors
- Add support for translate.wordpress.org.
- Don’t show the featured taxonomy on nav menu edit areas.
- Fix another potential PHP notice.
- Fix PHP warning when checking for the old method of querying for featured posts.
- Fix deprecated widget instantiation method.
- Don’t erase other terms in the pts_feature_tax assigned to the post on save. This opens up potential to have more than one type of “featured”, (e.g. recommended).
- Changing how featured posts are designated. Instead of post meta, the plugin now uses a hidden taxonomy.
- Added a widget for showing featured posts.
- Fixed the post_class filter to work properly on secondary loops.
- Fixed bug where the featured column would not show when viewing Media in the admin with list view.
- Fixed bug where saving settings did not always work.
- Changed the featured star in the admin to use the WordPress Dashicon font.
- Hello world!
- Add settings to the Settings->Writing page allowing admins to select the post types that can be featured.
- Add a check box in the publish meta box for marking a post as featured.
- Featured posts receive a featured and featured-$posttype class on them via the post_class filter.
- Admin post type screens have a column for Featured noting which posts are in fact featured.