Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter redwiredesign

    (@redwiredesign)

    I appreciate how the filter works, however the no data filter doesn’t affect the header. The function still prints out the header even if there are no posts.

    I’m sure you can imagine how embarrassing it is for a website to have a heading saying “Popular posts” and then there being none. It’s far better to show nothing until there is data.

    I shall use the class so I can achieve what I’m trying to do. Thanks.

    Thread Starter redwiredesign

    (@redwiredesign)

    Thank you I’ll try the class.

    Unfortunately the wpp_no_data filter isn’t useful in my case. The PHP still has no idea if there are any popular posts or not.

    It would be useful perhaps to add a param to return the string of HTML instead of echoing it from within the function. At least then we can determine if there are popular posts or not in the code.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)