Elephanta adds a simple Featured flag to blog posts that you can use in Elementor loops, the Ajax Search widget and your own queries.
#Mark a post as featured
Open any post and use the Featured Post panel in the editor sidebar. The Posts list gets a Featured column, where featured posts show a gold star, and a dropdown above the list to show featured or non-featured posts.
Posts → All PostsAdd New Post#How it is stored
Featured status is stored in the public elephanta_feature taxonomy with the term featured. It is kept in sync with the boolean post meta _elephanta_featured_post for integrations that use meta queries.
#Query featured posts
Taxonomy query (recommended):
$featured_posts = new WP_Query( array(
'post_type' => 'post',
'elephanta_feature' => 'featured',
) );
Generic tax_query:
$query_args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'elephanta_feature',
'field' => 'slug',
'terms' => array( 'featured' ),
),
),
);
Custom field query: query _elephanta_featured_post with the value 1.
REST API: resolve the term ID from /wp-json/wp/v2/elephanta-features?slug=featured, then filter /wp-json/wp/v2/posts?elephanta-features=TERM_ID.
Use the taxonomy Featured in an Elementor Loop Grid or Posts widget query, or the Featured filter in the Ajax Search widget.