Site logo

[Resolved] Is Query by Post Views ever going to become reality?

Home Forums Support [Resolved] Is Query by Post Views ever going to become reality?

Home Forums Support Is Query by Post Views ever going to become reality?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2499211
    Heath

    I have a news type website and would love to have a section of most popular posts by views. I use the post views plugin currently.

    Is that ever going to become a reality?

    #2499252
    David
    Staff
    Customer Support

    Hi there,

    its not something we would build into GenerateBlocks

    To do this kind of thing, requires a custom function to count post views and write them in the post meta or to a separate database. As this is not something that WordPress does. And probably for good reason; it means every time a post is viewed the database has to be queried. Which on a large or busy site could lead to a tonne of post queries, and if the data is stored in the post meta it means that post is constantly being updated. It could absolutely murder the performance of the site.

    If its a must have, then ask your current plugin author if the have a function that can return the IDs of the most popular posts, or whether there is a meta key that can be used to get the view count.

    If they do then with that plugin installed we can write a custom filter to get GB Query Loop to show those posts.

    #2514721
    Heath

    Thanks David!

    #2515341
    David
    Staff
    Customer Support

    Ypu’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.