WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] "Sorry no data" fallback (2 posts)

  1. andyfriel
    Member
    Posted 1 year ago #

    Hey,

    Is there anyway to detect if there are no posts being returned? For context, I'm using the plugin to display the daily most popular posts across various categories, but for some of the lesser used categories, it can take a while before posts start to appear, so rather than display the "sorry no data" message, I'd instead like to then move to displaying weekly/monthly/etc in the meantime.

    Is there anyway I can count the number of returned posts before they are output? Or a test for if any are returned?

    Thanks!

    Andy

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there,

    The plugin does check the amount of returned posts in order to display either the list of entries or the "Sorry, no data so far" message.

    About your suggestion, I'm not entirely sure that other people would like that and it might even lead to confusion. You might wanna change the configuration to list posts by views instead.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.