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
279 stars 83 forks source link

Get posts data #328

Closed mcDialogs closed 2 years ago

mcDialogs commented 2 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] It doesn't appear that there is a way to query the rest api for a list of popular posts with multiple taxonomies

Describe the solution you'd like A clear and concise description of what you want to happen. A way to query the api with multiple taxonomies OR a function similar to wpp_get_mostpopular() that returns an array of posts rather than echoing out those posts to the page.

cabrerahector commented 2 years ago

Hi @mcDialogs,

OR a function similar to wpp_get_mostpopular() that returns an array of posts rather than echoing out those posts to the page.

See get popular post id as an array with no HTML.

cabrerahector commented 2 years ago

Note though that this class is not meant for public usage as it can (and will) change without prior notice.

If you use it do keep an eye on the changelog to make sure you're up to date with potential future breaking changes.