Remove JSON API links in header html

Posted by Prem Tiwari | Updated on

This custom function should help removing all links in the header and footer – you may put it inside the functions.php file of your active theme:

And this snippet completely disable the REST API and shows the content below when you visit http://example.com/wp-json/, were example.com is the domain name of your website;

In order to disable WordPress REST API, use the snippet below:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers