Hi
I have a folder named “Mega” with a file index.php inside.
I am trying to add the header and footer of the theme
(My folder is in the root of the site)
I tried unsuccessfully several code:
And
<?php
require(‘./header.php’);
include $_SERVER[‘DOCUMENT_ROOT’].”/wp-content/themes/enfold/header.php”;
?>
Can you help me please !!
Regards,
Hi,
You’ll probably get an error (not a 404 one), but this will work:
include "../wp-content/themes/enfold/header.php";
Regards,
Josue
Hey,
– Ismael : I try to include my php script in the theme enfold.
– Josue : Can you tell me why it does not work ?
I have no error just a blank page…
Regards,
Hi,
It doesn’t work because it header.php calls a global variable, check your PHP log.
Regards,
Josue