0

I'm using wordpress for months and everything worked until today.

In my header.php I have my !DOCTYPE html, however it doesn't appear in my page.

I'm using chrome devtools to debug my code and when I look the source file I see a red dot before the doctype then when I mouse over it I see /ufeff.

Furthermore, in my code I have &#65279 right after /head tag that's make a kind of blank space between my header and my body.

I tried to change the encoding to utf-8 with notepad++ without success.

I tried all day to fix this issue and now I looking for some help.

subzero
  • 99
  • 9
  • Please post the relevant code in a code snippet so we can take a closer look at it. – pavger Feb 06 '18 at 22:46
  • Basically, I can't post the whole page and I can't post the doctype with the red dot from chrome dev tools. Do you need something specific ? – subzero Feb 06 '18 at 22:50

1 Answers1

0

Sounds like it might be a byte-order mark.

There are lots of answers which might help you, such as this or this.

tremby
  • 9,541
  • 4
  • 55
  • 74
  • I read about it. That's why I said I tried to change the encoding without success. I mean, the encoding seems to be utf-8 without bom, but I still have the issue. – subzero Feb 06 '18 at 22:46
  • Can you post the file somewhere? If you still see /ufeff somewhere, that BOM is still there. – tremby Feb 06 '18 at 22:49
  • Likely there are BOMs in other files too. Wordpress is including a ton of PHP files into each other. See this: https://stackoverflow.com/a/6543595/496046 – tremby Feb 06 '18 at 22:52
  • You are right, it's probably still there, but there's nothing before the doctype in my header.php. Right, however, I tried to change the encoding to all php files. – subzero Feb 06 '18 at 22:53
  • Yes, you'll need to search your other files. Another answer in the link I just gave gives a grep command which can help find them. – tremby Feb 06 '18 at 22:54
  • Alright, I tried the grep command on my theme directory and still nothing. – subzero Feb 07 '18 at 00:02
  • Then I can't help further without looking at your code. – tremby Feb 07 '18 at 00:08
  • Even on the wordpress dashboard I have the same bom without the doctype. Proabably not the theme. – subzero Feb 07 '18 at 01:45