Closed bmarshall511 closed 4 years ago
Hi Ben,
Just checked on my website and I can't reproduce this. The endpoint works normally for me: https://cabrerahector.com/wp-json/wordpress-popular-posts/v1/popular-posts?author=1,3&range=all
Maybe another plugin or something in your .htaccess rules is causing this?
Maybe, but don't think so. I've tried several other arguments & all seem to be working fine. Just doesn't like the author argument.
Here's the site:
404: https://benmarshall.me/wp-json/wordpress-popular-posts/v1/popular-posts?author=1 Working: https://benmarshall.me/wp-json/wordpress-popular-posts/v1/popular-posts?post_type=post&limit=3&order_by=views&range=last30days 404 (same as the working, but with the author attribute): https://benmarshall.me/wp-json/wordpress-popular-posts/v1/popular-posts?post_type=post&limit=3&order_by=views&range=last30days&author=1
Unfortunately links won't tell me much, Ben. As stated earlier, the endpoint works for me so it seems evident that the issue is on your side.
You'll need to do some debugging (disable plugins, switch to a different theme, check your .htaccess rules, try your setup on a different server (like a staging site, local server, etc.)) to figure out what's going on.
When trying to use the REST API, I want to grab posts by author. But get a 404 everytime, examples:
But using a string like:
it resolves, though of course isn't pulling by author.
Using the latest WP & plugin versions.