Disable WP Users Listing but enable only for Admins

Add code snippet to functions.php of your theme (chid theme preferible) This code will show a message like next one for not logged users:{“code”:”rest_not_logged_in”,”message”:”You are not currently logged in.”,”data”:{“status”:401}} Complete Disable WP REST API You can completely disable REST API if you will not edit posts or pages (will faill when create or edit, simply … Read more