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

Rest API get 404 #392

Closed MatrixYe23 closed 2 months ago

MatrixYe23 commented 2 months ago

Describe the problem

I have install wordpress-popular-posts, and active. and use as block html as below: [wpp range='last30days' stats_comments=1 order_by='comments']

and publish

Steps to reproduce it

when i open my wordpress, the rest api '/index.php?rest_route=/wordpress-popular-posts/v2/widget?is_single=0&lang=0' return 404 as below image the the block html show as: image

Expected behavior

image

Screenshots

Environment

Additional context

cabrerahector commented 2 months ago

Hi @MatrixYe23,

Make sure that you're using a Permalink structure that's not the Plain one, or else the REST API endpoint will not work.

MatrixYe23 commented 2 months ago

Hi @cabrerahector,

it works after not use the Plain Permalink structure. Thanks!