How to remove https://api.w.org/
Best WordPress theme for game news websites, game portals or whatever your preferred subject.
- GK User
- Tue Aug 15, 2017 12:16 pm
Hi Josh,
W3C is giving me some errors such as:
Bad value https://api.w.org/ for attribute rel on element link: The string https://api.w.org/ is not a registered keyword.
I have tried adding the below code to the functions.php but it has no effect am i missing something?
remove_action( ‘wp_head’, ‘rest_output_link_wp_head’ );
W3C is giving me some errors such as:
Bad value https://api.w.org/ for attribute rel on element link: The string https://api.w.org/ is not a registered keyword.
I have tried adding the below code to the functions.php but it has no effect am i missing something?
remove_action( ‘wp_head’, ‘rest_output_link_wp_head’ );
-
- Senior Boarder
- Joshua M
- Wed Aug 16, 2017 8:01 am
Hi,
Did you try this solution?
https://wordpress.stackexchange.com/que ... tp-headers
More information about the issue:
https://core.trac.wordpress.org/ticket/37841
Did you try this solution?
https://wordpress.stackexchange.com/que ... tp-headers
More information about the issue:
https://core.trac.wordpress.org/ticket/37841
-
- Moderator
- GK User
- Wed Aug 16, 2017 4:46 pm
Just tried that too and it has no effect. Just to make sure this should go in the main functions.php am i correct?
-
- Senior Boarder
- GK User
- Wed Aug 16, 2017 4:56 pm
Sorry for double post but i have fixed the issue and will share for anyone else wanting to fix this.
Add the below lines of code to your themes main functions.php file:
For discovery links add this one:
Add the below lines of code to your themes main functions.php file:
- Code: Select all
remove_action('template_redirect', 'rest_output_link_header', 11, 0);
remove_action('wp_head', 'rest_output_link_wp_head', 10);
For discovery links add this one:
- Code: Select all
remove_action('wp_head', 'wp_oembed_add_discovery_links', 10);
-
- Senior Boarder
- Joshua M
- Thu Aug 17, 2017 7:45 am
Thanks for your solution, I'm sure it will be helpful for other users.
-
- Moderator
5 posts
• Page 1 of 1