How to display most popular posts based on comments in wordpress

Many times we need to display most popular posts on sidebar or anywhere so for this we use either plugin or custom code but when we create custom theme at that time according to design we use custom code so that we can display posts according to design.

For this just you need to add this code where you want to display list of posts:

where you can change order and number of posts from query.

The post list will look like this:

popular-posts

Leave a Reply