Home Forums WordPress Plugins Hide My WP Renaming /wp-json/ to /json/ returns error 404

This topic is: not resolved
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #8762
    bozho
    Post count: 10

    Please advice how to rename /wp-json/ to /json/ by not getting error 404. Im using the replace tools.

    Thanks

    #8767
    Suman M.
    Post count: 12480

    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 );

    #8772
    bozho
    Post count: 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”/&gt;

    <link rel=”alternate” type=”text/xml+oembed” href=”http://www.domain.com/wp-json/oembed/1.0/embed?url= [path];format=xml”/>

    #8775
    bozho
    Post count: 10

    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]

    #8776
    bozho
    Post count: 10

    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/

    #8778
    bozho
    Post count: 10

    hello, anybody home?

    #8781
    Suman M.
    Post count: 12480

    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’

    #8784
    bozho
    Post count: 10

    WHEN THE PLUGIN INSTALLED AND ENABLED, SHOULD I REMOVE FROM THE THEME’S functions.php FILE, THE LINE:

    remove_action( ‘wp_head’, ‘rest_output_link_wp_head’, 10 );

    #8787
    bozho
    Post count: 10

    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”>

    #8791
    Suman M.
    Post count: 12480
    This reply has been marked as private.
    #8797
    bozho
    Post count: 10

    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.

    #8798
    bozho
    Post count: 10

    THE FOLLOWING LINE IN FUNCTIONS.PHP DO NOT REMOVE /WP-JSON/ ON MY CURRENT THEME:

    remove_action( ‘wp_head’, ‘rest_output_link_wp_head’, 10 );

    *** SO I FACE TWO ISSUES THAT ARE VIEWABLE IN THE SOURCE:

    1). /WP-JSON/
    2). WP TABLE-ID (ON WIDGETS)

    #8799
    Suman M.
    Post count: 12480

    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

    #8801
    bozho
    Post count: 10
    This reply has been marked as private.
    #8804
    Suman M.
    Post count: 12480
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.