• Resolved Lukasz

    (@wpfed)


    Hi,

    Is there a easy way to show popular posts first, then show the remaining posts that have no data right after?

    I’m thinking running custom query to check if the post has pageviews, if not, display those posts for each category?

    Thanks,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @wpfed,

    Well you could use the WPP_Query class to retrieve the list of popular posts, and then:

    1. Store the IDs of the posts returned by the class in an array to know which posts to exclude in your custom query.
    2. Calculate how many additional posts you need to fill the list.
    3. Build and output the list of popular posts using the results returned by the WPP_Query class.
    4. Finally, run your custom query.

    Hope that helps!

    Thread Starter Lukasz

    (@wpfed)

    Yes worked, thanks for the logic!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show posts with no data/views’ is closed to new replies.