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

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

    Hiya

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

    Screenshot https://cl.ly/p2Wn

    #39286
    Zac Gordon
    Keymaster

    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.

    #39329
    Corey
    Participant

    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 https://cl.ly/p31m

    #39339
    Corey
    Participant

    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.