0

I'm using the WP REST API plugin to get info from my website. I built a little plugin that uses this one. In my plugin I'm just removing some fields from the responses that I don't need.

Everything was working well until some hours ago the filter by category I was applying when requesting the categories stopped working. It started retrieving all posts.

I tried on an HTTP Request tool (POSTMAN) invoking the WP REST API and it doesn't filter too. My request URL is like this:

http://my.domain/wp-json/wp/v2/posts?_embed=true&filter[cat]=77

But if I try:

http://my.domain/wp-json/wp/v2/posts?_embed=true&categories=77

It works.

So I deactivated (and even uninstalled) the WP REST API plugin, made the request and it was still retrieving me the posts!

I have 2 questions:

  • Why is an uninstalled plugin still retrieving results?
  • Is it possible another plugin to be the responsible for retrieving the results? I checked the active plugins for another that could do something like this but didn't find anything...

I'm new using Wordpress so probably I'm not aware of something...

UPDATE

Wordpress version: 4.7

  • What version of WordPress is installed? – Dave Romsey Dec 7 '16 at 22:35
  • @DaveRomsey It's 4.7. – amp Dec 7 '16 at 22:46
  • Thought that might be the case. WP 4.7 added the REST API into core. I don't have a solid answer, but wanted to clear that up. – Dave Romsey Dec 7 '16 at 22:49
  • 1
    @DaveRomsey That explains why I was getting results even after disabling the plugin... It seems that is not fully compatible. But I think you found the problem! Thanks! – amp Dec 7 '16 at 23:14
2

WordPress v4.7 has added the REST API into core, so this might explain why your REST functionality is still available even after uninstalling the REST API plugin.

| improve this answer | |
  • This WordPress v4.7 video you referenced looks so impressive, like programmers are no longer needed... – prosti Dec 9 '16 at 0:03
  • I guess from now on if the project leader is feminine, the WP Jazz name will also be. – prosti Dec 9 '16 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.