cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
280 stars 82 forks source link

how to change content "Sorry. No data so far." #306

Closed MortezaZareiZakliki closed 2 years ago

MortezaZareiZakliki commented 2 years ago

Hi, Is your feature request related to a problem? Please describe. When not click the posts and not showing the posts, show message "Sorry. No data so far.", this not my problem because must show the message, when not showing the posts. My problem is how change this message. Example: "Excuse Me, No Posts for show." Or Empty message, not show message.

Describe the solution you'd like function for check the empty posts in Home Page Or Index Page, if not empty show popular posts and empty show customize message Or empty message. Example, This function name is wpp_is_empty() return true or false.

Describe alternatives you've considered function wpp_get_mostpopular($args) not echo values just return values, And use function wpp_is_empty() and check for empty or not empty then use wpp_get_mostpopular($args).

Thanks.

cabrerahector commented 2 years ago

Hi @MortezaZareiZakliki,

You can use the wpp_no_data filter hook to change the text message that gets displayed when no posts are found.