This tutorial provides the solution you need to display the most popular posts by number of visits ( views ) using the Genesis featured posts widget, By default, the featured posts widget doesn’t include a setting to show popular posts.
In this tutorial i’ll show you how to add a setting to the Genesis featured posts widget so you can choose to show posts by number of views.
Firstly, here’s the “Views Count” option added to the featured posts widget:
The code adds a extra setting to the options in the orderby drop down menu.
There’s 2 simple steps:
Step 1 : Upload the file named popular-featured-posts-widget.php to your child themes root directory.
Step 2 : Copy & paste the PHP code from the functions.php file to the end of your child themes functions.php file.
You can then drag the widget named Popular Featured Posts into any widget area and select the orderby setting to Views Count as seen in the above screen shot.
Here’s the code for logged in members: