top of page

[FIX] Pages Don’t Have Doctype Declared




How to fix pages that don’t have doctype declared

How to fix pages that don’t have doctype declared Do you have pages that don’t have a doctype declared? This is a fairly rare issue.

The doctype is literally the first line of code on any HTML page. It’s pretty easy to fix and I’ll show you how to do that.

So first log into your WordPress, and from your dashboard, scroll down over appearance, and click on theme editor.

Once in the theme editor, look at the right-hand navigation for your header.PHP. It’s usually called theme header.

Although depending on your theme, it could have a different name. Just make sure that it says header.PHP beneath in the parentheses and the doctype is your first line of code.

Literally, that’ll be the first line of code in almost any type of HTML page that I could imagine.

If you don’t have this, go ahead and insert this line of text right here to keep it on its own line.

WordPress usually should take care of this. So if you don’t have it, my guess is somebody deleted it by accident or something happened in the update and it’s missing. So just paste that in click to update your file and you should be all set.

Related Posts

See All
bottom of page