This function should take care for the input into the head of each page/post as asked.
Please make a copy of
functions.phpbefore 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: …’
- Login user into magento using wordpress account
- save array of objects with update_option
- What is the best way to reset the site? Different fails while set up
- How to conditionally concatenate and translate two very long strings?
- How to limit the number of posts in the wordpress loop in conjunction with the “download more” button?
- Use of undefined constant issue
- Themeco Looper Provider Query String for current user posts [closed]
- Remove colon from CTP UI “Singular Label”
- Customize create table SQL statement in any WordPress plugin
- Deprecated: stripos(): Error in WordPress After Updating to php 8.1
- How can I display all these movies in DESC order by modified?
- Remove /Page/ from slug when we’re visiting 2nd and other inner pages of the blog page
- WordPress Query – Blog Cards Duplicate issue
- Strip and print only the numbers found in current’s post excerpt (even if they are without space)
- How to send email verification code for a form?
- taxonomy pages returning “NULL” when running default WordPress function ‘get_queried_object()’
- Get User By Email – Not Working with Variables (PHP)
- Show numbers of related post based on sub category and HIDE parent category
- WordPress CPT & Custom Taxonomy with the SAME Permalink Structure
- Show post in elementor based on views and specific category with query id feature in elementor
- Registering a custom block style
- Retrive the value of the Active variation of the product and then link it to the “read more” to dynamically change
- Processing data and redirecting with query string
- get_var not returning a value when the field contains an apostrophe
- Changing src URL on page id
- Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english