Jump to content

Creating repeating headers and footers.


austinthompson

Recommended Posts

I know I am probably complicating this but I am looking for a way to code a header and footer to the exterme top and extreme bottom of my pages. I have seen it before but I have no idea how to do it from scratch. But I ore or less want to be able to edit my header or footer one time and it work every where.

 

Thanks in advance.

 

 

Link to comment
https://forums.phpfreaks.com/topic/258676-creating-repeating-headers-and-footers/
Share on other sites

I tend to use a $page_title like so:

 

$page_title = "Some nice page";

include 'header.php';

 

This then affects <title> some of the meta data and is also echoed as "<h1>" . htmlspecialchars($page_title) . "</h1>"

 

If I don't set it, <title> become a generic site name, and no header title is shown for the page.

 

Cheers

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.