• Resolved fersamp

    (@fersamp)


    HI,
    I’d need to add new custom enbdpoints to my wordpress site but I don’t know the correct way to add code safely.
    I don’t want that plugin update rewrite my custom code.

    I need to add new endpoints but I didn’t undeerstand the way to do this reading the guide, I mean which files to add and where to add them.

    Thank you everybody

    https://wordpress.org/plugins/json-rest-api/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hi,

    We recommend using WP-API v2 at this time. You can follow the integration documentation to learn more about adding your own endpoints.

    Thread Starter fersamp

    (@fersamp)

    Yes, I saw it, but where I have to put that code?

    I mean, in what file?
    I have to create another folder and create newe php files?

    I have fear about plugin updating…

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    You can put the code in a secondary plugin, your custom theme, or a variety of places. How to write custom code for WordPress isn’t something we support in the WP REST API support forum though.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add code to REST API safely’ is closed to new replies.