Part 1
In this video I will show you how to display your WordPress blog posts feed by “most popular“. This is an advanced tutorial and will require Elementor Pro.
Elementor (Affiliate Link):
https://wickydesign.com/get-elementor
Below are the 2 required plugins:
Advanced Post Queries – https://wordpress.org/plugins/advanced-post-queries/
WP PostsViews – https://wordpress.org/plugins/wp-postviews/
Part 2
Query Code:
add_action( ‘elementor/query/pop-posts’, function( $query ) {
$query->set( ‘orderby’, ‘meta_value_num’ );
$query->set( ‘meta_key’, ‘views’ );
} );