WP SITES

2952 Tutorials & 191 Plugins

Display Featured Posts Using a WordPress Plugin

Featured Posts Plugin for WordPressYet Another Featured Posts Plugin (YAFPP) is a plugin to display and manage a list of featured posts and/or pages in WordPress,

Check the ‘featured stars’ next to each post in WordPress All Posts screen to feature or unfeature a post.

You can also display thumbnails with your featured posts by installing YAPB.

YAFPP integrates perfectly with YAPB, and allows you to display thumbnails with your featured posts.

Installation & Setup

  1. Select featured posts by clicking the ‘featured stars’ within the post listing in ‘Posts > Edit’
  2. Insert  [php]<?php if ( function_exists(‘get_featured_posts’) ) get_featured_posts(); ?>[/php]

    where you want to display a list of featured posts in your themes template.

Caution: Always create a full backup of your WordPress files & databases before adding php code.

Go to your posts listing in the WordPress admin panel ( Posts > Edit ). Here click on the stars on the right side of the post listings to feature or unfeature posts.

Featured Posts - All Posts Screen

In your site’s template include <?php get_featured_posts(); ?> anywhere that you want to display the post listing.

Currently Featured Posts

Listing display options can be configured in the WordPress admin panel – Settings > Featured Posts (YAFPP). Here you can select which aspects of the post you want to show in the listing, along with the maximum number of posts to display, and the max length for the excerpt if displayed.

Featured Posts Display Settings

Using Hooks to Display Featured Posts

If you’re using a theme or plugin which allows you to execute php code using your themes or WordPress hooks, you won’t need to add any code to your template.

Simply paste the code into the hook location and you’ll display the feature posts you have configured in your settings.

Conclusion

You’ll find many themes offer built in functions and widgets for displaying a list of featured posts so a plugin like this may not be needed.

Support is available from the WordPress plugins forums.

Was This Tutorial Helpful?