Documentation

Display Most Viewed Posts With Max Addons’ Query Loop in Bricks Builder

We've added a new query type to the Max Query Loop: Most Viewed Posts!

As the name suggests, this query option allows you to showcase your most viewed posts anywhere on your website.

Before You Start:#

Make sure you've installed and activated the Post Views Counter plugin. You can easily install the free version right from your website's dashboard.

post views counter

Let's Get Started:#

  • Start by editing your existing Single Post Template. If you prefer, you can also create a new page and save it as a template later. Once you're in there, hit the 'Edit with Bricks' button.
  • Drop in a "Container" element on your page and toggle on the 'Query loop' option.

enable query loop

  • Once you enable the query loop, a drop-down menu will appear. From there, choose 'Max Query.'

choose max query

  • Under Max query type, select 'Most viewed posts' from the drop-down menu.

choose most viewed posts

  • Next, set the Post type to "Posts" to make sure you're showcasing blog posts.

select posts

  • You can define the number of posts you want to display in the Posts per page option.

posts per page

  • In the Order option, you get the flexibility to choose whether your posts appear in Ascending or Descending order.

order


And that's it! You've just used the Max Query Loop to display your most viewed posts. Hope this helps :)

Not the solution you are looking for?

Please check other articles or open a support ticket.