This function should take care for the input into the head of each page/post as asked.
Please make a copy of
functions.php
before adding following code.
Adjust to your own preferences if needed.
/**
* Add meta to head
*
* Read more {@link https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head}
* @version WordPress 4.8
*/
function wpse272951_wsm_keep_ie_modern()
{
echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/> \n";
}
add_action( 'wp_head', 'wpse272951_wsm_keep_ie_modern' );
PS, it should not be added into the header as mentioned by you but into the head of a page between <head> </head>
(which will be done by this function automatically).
Related Posts:
- Display current category title on category page
- Genesis – Customize search form
- How to set custom cookies before output
- Adding a search form inside a div
- How to stop loading multiple copies of jquery
- Creating a WordPress form with a PHP script and default header
- Why isn’t my if/elseif/else working correctly here?
- How to add specific menu on a specific page or pages
- Add custom HTML to posts page
- Using PHP to toggle stylesheet and header image, set in cookie
- Mysterious HTTP 404 header in my own scripts
- Change logo based on incoming domain
- Echo URL of large version of Featured Image
- Conditional Header in wordpress
- add_image_size for header_image
- Responsive Header for Phone
- wp_enqueue_scripts leads to error
- Adding function to Genesis genesis_header [closed]
- My php header() function is not working [closed]
- “imagejpeg” function is not working in wordpress
- wp-comments-post.php file returns a blank page
- Insert custom PHP head above in WP pages
- Headers already sent in Pluggable.php / homepage and wp-login error
- Is_front_page inside header.php is always returning true
- Does wordpress templates always in files or in database?
- Adding Meta Tags to a Post using its Tags, Excerpt and content
- Moving code from theme header to functions.php
- WordPress wp_redirect error
- Having Issue on Redirecting With Session in WordPress
- linking stylesheets and scripts with functions.php
- Location of core code for database connection and get_header
- Clickable image link sends people to wrong URL
- unknown issue in ‘header.php’ preventing theme from displaying fully
- How can I use a sliced image As banner? [closed]
- Add meta tags to a custom header
- Use custom template on custom post type
- Is this a correct usage of ob_start() in my WordPress project?
- Change header on pages displaying taxonomy items
- Custom CSV exporter – Cannot modify header information – headers
- Genesis / custom template page / setting the page title and meta desc
- Randomize Color Scheme Selection in Theme
- How to add Post Tags to a new element in header.php?
- setcookies and header send
- Hard-coding a shortcode as the last menu item in primary navigation?
- How to internationalize header image?
- Custom functions for string data calculations
- How do you remove header sitewide from mobile only?
- WP_REST_Response – How to return Gzip answer and add Content-encoding header?
- How do I use an iFrame for my header in WordPress twenty seventeen?
- WordPress can’t use ZipArchive
- Reliable way to add nonce to HTTP Header in WordPress?
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Display values of current POST request on page
- Changing ALT-tag for logo in wordpress
- Using Javascript On Page – Header and Footer Now Missing
- Modifying child theme’s header
- Add my footer menu to the header
- Replace header with large image on home page only, using Genesis child theme
- Change headers for one custom PHP file
- Premature end of script headers: wp-mail.php?
- setcookie() issues on running with HTTPS on WordPress
- Allow user to choose header style
- How to include different html tags in the header for different pages?
- Use header option on wp-login page with a second logo
- Adding custom PHP to existing loop in Genesis
- my site show this symbol (::) between site title and tagline
- Headers Already Sent
- Changing 2011 theme header image based on user dropdown
- Converting Menu Links to List Elements
- Warning: Cannot modify header information (with a twist)
- Cannot get custom javascript to execute on page
- Cannot modify header information – headers already sent
- Inserting a shortcode into a genesis menu?
- Dynamic Email Handler with ‘header (“Location: …’
- Disable astra_get_search_form from generating in header [closed]
- Using `send_headers` action to set `X-Frame-Options` not really working
- Help with page nav?
- Show recent posts starting at a specific number archive
- Add title=”” to A PHP Code
- Get Page ID from Backend
- Help with WordPress function inside a shortcode
- Wpdb->insert() doesn’t insert new row after the last one
- WordPress plugin admin page – using WordPress function in linked php file
- HTML table attributes ignored
- What’s the best way to include PHP code in pages?
- Is there any wordpress plugin to upload images and captions to multiple pages once
- How to fix this PHP warning in WP-Admin after upgrading to 3.1.2?
- PHP in Edit Post link
- Removing the first 8-10 letters from a post?
- How to add drag and drop functionalities to a div inside option panel
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- Timthumb.php image gallery not working on Multisite WordPress
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- How do you create two separate Register pages?
- $_GET[‘updated’] does not work in WordPress 3.1?
- Why doesn’t PhotoSmash plugin play well with wp_query?
- How to send form data from WordPress (Meta Box) to an OData service?
- How to Configure Events List in WordPress to Disappear Event Once Date is Past
- Removing WordPress Footer -without access to PHP code?
- dynamic page using php from sql database