With this code, we will show posts base on user views. The main trick is we will put a counter that will count how many time that page get views.
First Step
Put This code on functions.php
Now we have a counter set up with the key, let show post on index.php or any page template as you want.
It’s done! Is not it so simple? 😛 You will need to customize some HTML to show posts as you want. If post not showing on the template page, then visit some posts so view value gets some count.
1 Comment
This is a awesome website for code.