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

Shortcode with date range attribute #357

Closed Ani-Soft closed 1 year ago

Ani-Soft commented 1 year ago

Hi,

I wanted to know if i can pass date range in shortcode to get data for specific time period.

This date range thing already working in wp-admin but wanted to know if same can be used in front-end with shortcode

Something like [wpp range="custom" daterange="yyyy-mm-dd,yyyy-mm-dd"]

TIA

cabrerahector commented 1 year ago

Hi @Ani-Soft!

No, there's no such feature unfortunately. The thing you see on the Stats screen is actually custom database queries especifically written for this screen.

If you want to get popular posts within a given time period you'd need to do the same (write custom database queries).

Ani-Soft commented 1 year ago

Hi @cabrerahector Thank you for you reply.

I will use custom database query to get data in specific date range.