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: …’
- Switching wp_get_sites to get_sites
- Modify image while uploading
- How php content after the first and second paragraph
- How to override .htaccess with new rules without ftp or edit it manual
- Check if term object is in array
- How to prevent those PHP variables from being cached on WordPress?
- wp_query with cat not working
- Compare post-IDs within WP_Query? (Less than / Greater than)
- WordPress returning 404 for multisite pages
- Need help enqueueing webfonts
- WP & Server Speed [Teacher Question]
- Extending WP_Customize_Media_Control to return filename
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- Why does my settings form redirect to the homepage?
- Passing an array into WP_Query as a variable
- Shortcodes showing in excerpt despite using strip_shortcodes
- Using php inside javascript [closed]
- Simple seo-friendly custom $_GET url rewrite with htaccess
- Store GA Client ID in User DB
- Hide author from search results meta, still display date and categories
- Why does a header location on admin_head remove the query var I’m setting in the location?
- Get all woocommerce product names with price and show using core php
- admin uploads pre_get_posts not working as expected
- can’t delete a row from post_meta table
- WooCommerce Modal Fly cart on add to cart – With AJAX
- /page/2/ redirect to 404