• Hello,

    I understand that we have wpDataTables javascript object available within the browser. However, it’d be nice to have a way to fetch data using WordPress REST API.

    Thank you,
    Pothi.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Actual this can be done using WP rest routes
    https://www.ads-software.com/plugins/rest-routes/

    The reason why a traditional WP REST API URL won’t work is due to it returning a non-2-dimensional JSON array.

    But Rest Route returns every 2 dimensional!
    Just make sure NOT to include the “https” when added the URL to WPDatatables.

    • This reply was modified 5 years, 5 months ago by samjco.
    • This reply was modified 5 years, 5 months ago by samjco.
    Thread Starter Pothi Kalimuthu

    (@pothi)

    I wasn’t aware of rest-routes plugin. A project that required rest api (for wpDataTables) is no longer active. So, I need to test it out on a demo environment to keep it handy for future projects. Thanks for the suggestion @samjco .

    Plugin Author wpDataTables

    (@wpdatatables)

    Hello there.

    Thanks for the tip @samjco. @pothi did this help you out?

    Best regads.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature Request – Fetch Data via REST API’ is closed to new replies.