• Resolved Joe Streno

    (@butisitart)


    Hi Ben …

    I’m back ….

    I am having some Yoast sitemap issues. With all the research I’ve done I’ve traced it to there being two blank lines (01 & 02) before Doctype is written.

    01
    02
    03<!DOCTYPE html>
    04<!--[if IE 9 ]><html class="ie9" lang="en-US" prefix="og: https://ogp.me/ns#"> <![endif]-->
    05<!--[if (gt IE 9)|!(IE)]><!--><html lang="en-US" prefix="og: https://ogp.me/ns#"><!--<![endif]-->

    It also happens if I turn off every plugin in my WP Admin. There are still 2 blank lines before <!DOCTYPE html> is written. So it’s ether something odd in the Tracks theme, or WordPress itself.

    If I look at the Tracks header.php file <!DOCTYPE html> is written at line 01. Somehow WordPress or Tracks is adding 2 extra lines before <!DOCTYPE html> is written.

    Any ideas where these 2 blank lines might be coming from?

    https://www.go2jo.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hey Joe,

    I just checked with a local install of Tracks and I saw the DOCTYPE at the very first line. It is the same with the live demo site.

    My inclination is to say it’s still coming from a plugin. You’ve already deactivated them, but there is a chance that one was still running code or the page was cached with the spaces added.

    I would try clearing your cache (if you use a caching plugin or if your host has a caching feature), and then connect to your server via FTP and rename the plugins folder to “plugins.hold”. This is a trick recommended on the codex for forcing all plugins off.

    Thread Starter Joe Streno

    (@butisitart)

    Ben …

    Figured it out. D’oh!

    After I tried all you said, still had spaces. I remembered I had added 2 functions to the functions.php and when I checked , I had added both new functions within their own <?php ?> brackets. before the Tracks opening functions. That added the two empty lines to the HTML.

    We live & we learn. Or we live and we don’t. ??

    Double D’oh!

    But my Yoast sitemaps are working again. Woo hoo!

    Thanks … Joe

    Theme Author Ben Sibley

    (@bensibley)

    Aha! Glad you found that, and thanks for sharing the solution here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blank Lines In Tracks Header’ is closed to new replies.