On my site, I have a header.php,a footer.php, and a content.php which grabs the header/footer and selects page content from a directory file (?page=pagename). The problem is that when content.php includes the directory content files, it doesn't include all of the <header> information.
To fix this, I added this to one of the directory content files (placed above all other content):
And this to my header.php page:
I was hoping this would print the designated title of the page, but instead I just still get no page title. Does anyone know what I did wrong/if this is possible at all?
I'm pretty new to php, so any help is appreciated! :biggrin:
To fix this, I added this to one of the directory content files (placed above all other content):
Code:
<?php
$title="PAGE TITLE";
?>
And this to my header.php page:
Code:
<header>
<title><?php echo $title;?></title>
</header>
I was hoping this would print the designated title of the page, but instead I just still get no page title. Does anyone know what I did wrong/if this is possible at all?
I'm pretty new to php, so any help is appreciated! :biggrin: