The first thing you should know is that Featured Post has not been available in WordPress for a long time. But we can still create it ourselves by writing query from our tags or categories names.

  1. You just create a post as simple as you can.
  2. Create tag name as “Featured” then add into your recently post.
  3. Implement some codes to call it or just copy the code below:
$last_posts = new WP_Query( array(
    'post_type'           => 'post',
    'posts_per_page'      => 1,
    'post_status'  => 'publish',
    'post__not_in' => get_option('sticky_posts'),
    'tax_query' => array(
            'taxonomy' => 'post_tag',
            'field'    => 'name',
            'terms'    => 'Featured',
    'orderby'             => 'rand',
    'order'               => 'desc'
) );
    //display your code loop here

That’s it. If you like this post, please give us some thumbs up.


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *