How to enable wordpress rest api

Viewed 20283

I'm trying to use the Rest API in my brother's wordpress news website but https://my-site.com/wp-json only returns {"code":"rest_disabled","message":"The REST API on this site has been disabled.","data":{"status":403}} I asked my brother if he had disabled the rest api but he doesn't understand what i'm talking about.

1 Answers

I solved it, it turns out the theme my brother was using for the site have disabled rest api by default infunctions.php. All i had to do was to look in the file and comment out the code that disables the rest api.

Related