Home › Forums › WordPress Plugins › Hide My WP › Renaming /wp-json/ to /json/ returns error 404
Please advice how to rename /wp-json/ to /json/ by not getting error 404. Im using the replace tools.
Thanks
Hi, renaming wp-json will not work. You’ll need to add following line in your theme’s functions.php file:
remove_action( ‘wp_head’, ‘rest_output_link_wp_head’, 10 );
That line in functions.php removes the first line http:/domain.com/wp-json/
but the following lines are still there:
<link rel=”alternate” type=”application/json+oembed” href=”http://www.domain.com/wp-json/oembed/1.0/embed?url=%5Bpath%5D”/>
<link rel=”alternate” type=”text/xml+oembed” href=”http://www.domain.com/wp-json/oembed/1.0/embed?url= [path];format=xml”/>
I need to be able to change the url from http://www.domain.com/wp-json/%5Bfull_path%5D to http://www.domain.com/json/%5Bfull_path%5D
and then to use the replace tool by replacing in the html code /wp-json/[full_path] to /json/[full_path]
In other words:
(1). url to change from http://www.domain.com/wp-json/ to http://www.domain.com/json/
(2). replace tool in the html code /wp-json/ to /json/
hello, anybody home?
Replacing /wp-json with /json will not work. As of now, you can only remove it. And to remove/disable oembed you can use plugin like ‘Disable Embeds’
WHEN THE PLUGIN INSTALLED AND ENABLED, SHOULD I REMOVE FROM THE THEME’S functions.php FILE, THE LINE:
also renaming wp-calendar to calendar brake the styling of the calendar. Do you have an idea how to replace that ID?
<div id=”calendar_wrap” class=”calendar_wrap”><table id=”wp-calendar”>
the problem is with the widgets. All active widgets show
table id=”wp-
Replacing do not work as it brakes the styling.
Please let me know on this.
THE FOLLOWING LINE IN FUNCTIONS.PHP DO NOT REMOVE /WP-JSON/ ON MY CURRENT THEME:
*** SO I FACE TWO ISSUES THAT ARE VIEWABLE IN THE SOURCE:
1). /WP-JSON/ 2). WP TABLE-ID (ON WIDGETS)
1) adding that line works in our test sites. Please let us know your website’s wp-admin login details (as private reply), so that we can have a look at this issue further.
2) as explained above it’s not recommended to replace css class names/IDs. For more details check this FAQ – http://codecanyon.net/item/hide-my-wp-no-one-can-know-you-use-wordpress/4177158/faqs/20827
You must be logged in to reply to this topic.
Hide your WordPress website from hackers and detectors. Read more