BOM in UTF-8
-
Hello, I have tested my site Link in W3C validator, and here is the result:
Warning Byte-Order Mark found in UTF-8 File.
The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.
The BOM mark is before <!DOCTYPE html>
I have changed my header.php in my child theme here how it looks like:<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id=”content”>
*
* @package dazzling
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset=”<?php bloginfo( ‘charset’ ); ?>”>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”viewport” content=”width=device-width, initial-scale=1, user-scalable=no”>
<link rel=”profile” href=”http://gmpg.org/xfn/11″>
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”><!– favicon –>
<?php if ( of_get_option( ‘custom_favicon’ ) ) { ?>
<link rel=”icon” href=”<?php echo of_get_option( ‘custom_favicon’ ); ?>” />
<?php } ?><!–[if IE]><?php if ( of_get_option( ‘custom_favicon’ ) ) { ?><link rel=”shortcut icon” href=”<?php echo of_get_option( ‘custom_favicon’ ); ?>” /><?php } ?><![endif]–>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id=”page” class=”hfeed site”><nav class=”navbar navbar-default” role=”navigation”>
<div class=”container”>
<div class=”navbar-header”>
<button type=”button” class=”navbar-toggle” data-toggle=”collapse” data-target=”.navbar-ex1-collapse”>
<span class=”sr-only”>Toggle navigation</span>
<span class=”icon-bar”></span>
<span class=”icon-bar”></span>
<span class=”icon-bar”></span>
</button><?php if( get_header_image() != ” ) : ?>
<div id=”logo”>
“><img src=”<?php header_image(); ?>” height=”<?php echo get_custom_header()->height; ?>” width=”<?php echo get_custom_header()->width; ?>” alt=”<?php bloginfo( ‘name’ ); ?>”/>
/div><!– end of #logo –><?php endif; // header image was removed ?>
<?php if( !get_header_image() ) : ?>
<div id=”logo”>
“><img src=”<?php get_stylesheet_directory_uri() ?>/wp-content/uploads/2015/06/icon-logo.png” alt=”logo” />
<span class=”site-name”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”>city <span class=”light”>tomy</span>creek</span>
</div><!– end of #logo –><?php endif; // header image was removed (again) ?>
</div>
<?php dazzling_header_menu(); ?>
</div>
</nav><!– .site-navigation –>I’v tried to save header.php in Notepad++ without BOM, but it didn’t help.
Any sugestions, thanks
The topic ‘BOM in UTF-8’ is closed to new replies.
