Popular Posts using Loopers

Hi there!

Is there able to create a string or query to bring up the most popular posts via the looper?

Thanks!
Marc

Hello Marc,

Thanks for writing in!

You can use the Looper Provider Query String and run a query string that orders the post items by comment counts.

Best Regards.

I’m still learning all the things, but I know in other builders like Elementor, I’m able to put in a popular posts element into the website that is based off of views. Since other builders have this option, I feel like it is possible with Pro. Is it based off of a different string or is it more so custom code that needs to be inserted?

1 Like

Hi Marc,

There is no exact parameter for the Popular post is available, but it can be decided upon the comment count for the posts. I would suggest you use the Query Builder and set the Order By option to Comment Count and check if that helps.

Screenshot-2022-01-19-164130

Thanks

Update: I mentioned to create a custom feature where I am now able to track views for each post, but I’m having trouble getting Pro to bring in that data in order to populate a grid dynamically. Is there a Query that I can add to make this happen?

Hello Marc,

If that is the case, you will have to use the Looper Provider Query String:

You will have to query post items with the custom field views and order it by a descending order to display the greater number of views.

Hope this makes sense.

it does, but I’m still new to query strings so I’m confused on how to write out the string. Any chance you can help me with that?

Hi Marc,

You can check this thread as an example of how to write the query string.

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.