JavaScript for WordPress Forums The WP REST API function error in API Ajax demo?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #39231


    When I attempt to run – jQuery AJAX demo I get listPosts is not defined in the console


    Zac Gordon

    Okay, a couple troubleshooting tips to start..

    1. Is this the example code or code you typed out? Does the example code cause the same problem without any changes?
    2. Double check the request is being made to the correct URL and that URL returns what you expect in the browser.

    The problem is the posts are not being grabbed, but there are a few steps at which this problem could occur.


    Thanks for the reply Zac,

    This is the example code, the only thing I altered was the url for the api root, when I use the api root in the browser it works just fine.

    Here’s a zip of what I’m using


    I was able to fix it by downloading the latest version again and starting from scratch. Apologies for the false alarm.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.