• Resolved simkog

    (@simkog)


    Dear Developer,

    Is it possible to display the posts ordered by view count? I want to list the first 6 post.

    On your support page it says that it supports meta_key and meta_value. I tried this shortcode, but it gives an empty result only.

    [display-posts posts_per_page="6" image_size="thumbnail" include_excerpt="true" orderby="meta_value_num" meta_key="post_views_count" order="DESC"]

    Best regards,
    Gergo

Viewing 1 replies (of 1 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Do you have a plugin that is storing the view count on your posts using the post_views_count key? If you’re getting no results, I’m guessing you don’t have anything storing the view count (which is a good thing since that would be terribly taxing on your server).

    If you have Jetpack installed and the Stats module enabled, you can install BE Stats to attach this data as metadata on the post. You can then use [display-posts orderby=”popular”]

    Or you can display posts by share count (a great metric for popularity if your content is often shared) or comment count.

Viewing 1 replies (of 1 total)
  • The topic ‘Get most viewed posts’ is closed to new replies.