Support » Plugin: JSON API » Posts found but not returned

  • rhj4


    My ajax call to get_category_posts returns the correct information about the category and says that there are a number of posts associated with the category, but the posts array is empty. I have tried this command directly from the browser and it does return all of the correct data, so I suspect that the problem is with my ajax call.


    My ajax call looks like this:

       type: "post",
       async: true,
       url: url,
       dataType: 'json',
       success: function (results) {
          if (handler !== undefined) {
       error: function (xhr, textStatus, errorThrown) {

    What is the correct ajax call to get the data back?

Viewing 1 replies (of 1 total)
  • To start, I’d remove the

    if (handler !== undefined) {


    Replace it with a console.log(results) to see the json data in the browser’s console. From there, you can write $.each() loops to iterate over the object’s data.

Viewing 1 replies (of 1 total)
  • The topic ‘Posts found but not returned’ is closed to new replies.