PHP Include gets moved to inside <body> automatically


Hi there

Inside the head tag i have the a php include with a few scripts and css links.

When publishing, the include gets moved to inside the body tag

The include looks like this

<?php require_once 'includes/header.php';?>

Is there a way to stop this from happening or is there a better way to do it?



Which version are you on? Version 5 (account created before April 17, 2019) or version 7 (newer accounts)?


Version 7 - I have includes in other parts of the site that work perfect, it’s just the one in the head that is causing an issue


I’m thinking it’s probably a mismatched tag or a missing closing tag somewhere. The parser will try to correct invalid markup, so if it’s moving things around like that, that would be my first guess.

Happy to take a look at the page in question if you can’t find it. Might be easier to submit a support request in that case :slight_smile:


Thanks, will check for any mismatched tags & submit a request if all else fails