The output is generated by the rest_output_link_header(). This function is used in two actions, wp_head and template_redirect in default-filters.php:@line234. You can remove the function from those hooks to remove the output you wanted to remove. Put the following codes in your theme’s functions.php to achieve the desired result.
remove_action( 'wp_head', 'rest_output_link_wp_head', 10);
remove_action( 'template_redirect', 'rest_output_link_header', 11);
Both actions are defined in ABSPATH/wp-includes/default-filters.php
under // REST API filters.
Related Posts:
- Is it safe to fix Access-Control-Allow-Origin (CORS origin) errors with a php header directive?
- How can I use CURLOPT_USERPWD in wp_remote_post?
- Setting Last Modified HTTP Header on static Home Page
- If Modified Since HTTP Header
- Remove rel=shortlink from HTTP header
- HTTP Header on specific page is application instead of text
- WordPress 502 | Header Upstream send too big
- What is this HTTP_REFERRER “WordPress/4.1.2”
- Enable CORS for getting an inline SVG by URL
- Why is http header providing 404 while site is online?
- How do you modify HTTP response headers on feed/?
- Hiding WordPress REST API v2 endpoints from public viewing
- How does one suppress a 404 status code in a WordPress page?
- disable wordpress canonical tag meta
- Disable h1 and h2 from rich text editor combobox
- Recommended location to set response headers?
- Custom endpoint and X-WP-TotalPages (headers)
- Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files
- Additional Option on Custom Header admin
- Programmatically log in a wordpress user
- How can I change HTTP headers only to posts of a specific category from a plugin
- Getting redirect to happen before header output
- How do you log a user out with wp_logout?
- Change the headers content type with wp_remote_post
- Why I can’t add a script-code into theme-settings without 403-forbidden?
- x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response
- Authenticate a user for current request
- Remove link around logo
- wordpress api using rest_route for other pages
- Is there an equivalent to WP_Error object I can return in the case of a successful REST request?
- Facebook embeds loading the wrong language
- Banner in WordPress
- WP Remote Request not returning all of content via request
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- “No Access-Control-Allow-Origin header is present” even though it is in the entry file
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- I want to hide header in the static homepage that I am working on [closed]
- Creating dynamic header and footer files
- How to Access Script Tags in Header
- H1 tags for header image?
- Problems accessing stylesheets/scripts loaded in WP header
- Rotate images in header based on date
- Trying to set a cookie based on $_POST parameter
- 404/500 error on content images if Referer header is from another domain [closed]
- Strange behavior: random HTTP error 500 fixed by visiting Permalinks settings page (htaccess issue with language code)
- How to add some lines to the wp-login.php header via functions.php?
- How to Customize Wp Default Title and a prefix
- allowed_http_origins() only works in theme functions.php
- Last-Modified header support doesnât speed up server processing – want more
- Send a get request to wordpress
- Why does WP HTTP API switch the method (POST/PURGE) to GET when redirecting (302)?
- Insert stylesheet into WordPress header?
- How to register and set http/2 server prefetch for a specific asset?
- WordPress Template not getting my Sub-Header File
- How to add social follow button to header? [closed]
- Empty lines in header, how to remove them
- Benefits to using CSS for header image instead of html img tag [closed]
- Export Header and Footer
- Inserting iframe right after on header.php
- How to add script right after ?
- Code needs wrapper/container to put footer back in, but where?
- WP Rest API – Change response status code for failed validation request
- Properly loop through and paginate page on each function call
- Including PHP files in header.php
- Display values of current POST request on page
- Remove unwanted fields from WP API response
- How to make my banner (logo image) position on the center
- How to receive JSON payload from a digital device
- Easiest way to use relative URLs in my WordPress header
- Should I use do_action in the header file?
- Update Code to be Compatible with WP 5.3 (‘cannot modify header information’ warning)
- set cookies on certain page only
- Twenty seventeen header is not responsive
- 3 WP installations on the same domain, with the same header
- Modifying server’s response to API endpoint
- How to make custom_header_setup() image as background image?
- WordPress cookie issue on login: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- Insert Code into Header Only on Blog Posts
- How do I change top header background color
- only header is showing up in posts
- In the Header.php file, is there a way to swap between one layout and another?
- video header in desktop view, image header in mobile view
- expires header in w3 total cache
- show wordpress data without headers
- Header Image instead of dynamic text
- Code to Show for One post only in head
- Removing old code from header
- Random header image but also specific header for certain pages
- How to remove uncategorised posts from WordPress
- Dynamically changing header text depending on URL in WordPress html page
- Custom header shows two or three or more images
- After being hacked Fatal error: Call to undefined function get_header() in 404.php on line 1
- making posts linked outside of WordPress still use the same header and footer
- How change the header color?
- Custom Header won’t Repeat
- Loading second header.php for other homepage showing double header.
- My CSS, footer and header don’t show up!
- Editing Header with a Page Builder [closed]
- wp_redirect problem using code snippets
- How to add meta description correct way