Doctype error help

Hey brickster,
i’m trying to seo optimize a website built with Bricks ( https://dinamo.network ) ) . I have done almost everything, but I’m stuck with the doctype declaration that is not found ( checked on https://seositecheckup.com/ and ubersuggest.com).
Could someone point me in the right direction?
Thanks!

Hi!
I noticed that there is a code from Google Analytics placed above the <!doctype html> tag. So, the <!doctype tag> is still there. It can’t be found just because it has been pushed away by the google analytics code.

May I know, how did you insert that code? Through a plugin or…?

I checked my site all rendered correctly.

You included the Google Analytics code too early (i.e. before the beginning of the HTML).

It is best to remove this embedded code, then the DocType should be in first place again.

After that, use the one in another designated area. (e.g. in the HEAD tag)

It is a weird behaviour. There is no way the code could go beyond the <!doctype>. Either plugin issue or a bug. I suspect.

So I’m guessing that the code wasn’t embedded with bricks, but in another way.

i’m almost lost. I have done a wp clean new install, same for plugins. But the code is still here. I have no idea of what’s going on here. But i think is something bricks-related cause if I switch to another theme the code is gone.

Any help is appreciated

Hi Andrea,

if you do a fresh installation with Bricks only (no plugins), is there a Doctype at the top of the source code?

@tenentecartina
Try disabling your plugins one by one(clear cache if you have a caching plugin enabled) to see if it’s caused by any of the plugins you have?

And, how do you insert the code of Google Analytics? Is it a plugin?
I suspect a plugin issue.

If it is still there after deactivating all plugins, it may also be incorrectly integrated somewhere via hardcode echo output.

Maybe take a look at config.php and function.php, because it definitely doesn’t belong there in this way.