Method 4)
We could try to modify method #2 by increasing the quantity
option, to 6 but display only 4 (just as an example):
add_filter( 'longform_get_featured_posts', function( $posts )
{
shuffle( $posts );
if( count( $posts ) > 4 )
array_slice( $posts, 0, 4 );
return $posts;
}, 11 );
To increase the number above 6
, then max_posts
need to be modified from this code part:
// Add support for featured content.
add_theme_support( 'featured-content', array(
'featured_content_filter' => 'longform_get_featured_posts',
'max_posts' => 6,
) );
Many other variations could be possible, but I stop here ;-)