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
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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.