I'm running EE 5.2.6 and also using the Okler Porto Theme HTML5 Template v7.2.6 (Most Recent).
I have spliced up the Okler Porto Template into Header, Body and Footer.
The issue I am having is with my contact page form. I am using their 'contact-us-advanced.php' script which is PHP and pasted above the in my header section.
I have turned PHP on in my 'header-contact' html template in EE 5.2.6. When I load the page I get this error message:
Fatal error: Namespace declaration statement has to be the very first statement in the script in /var/www/vhosts/thearthole.co.uk/httpdocs/bumhole/ee/legacy/libraries/Functions.php(627) : eval()'d code on line 2
Is there a fix for this issue and am guessing that EE is writing some white space above the PHP script in the template.
Best regards, Rob