Jump to content

HTML help? Global headers/footers/sidebars


Recommended Posts

Sorry if this is in the wrong section. I just need some help.

 

So I'm a bit on the computer illiterate side, and I'm only knowledgeable about the very basics of HTML and CSS, so please try to dumb down the language for me. :wacko:

 

So I want to be able to global headbars and sidebars and stuff so that I can place them on many pages, but only have to edit one file. Instead of having to go into every single page and changing the HTML, I want to be able to change one file and have those changes appear on all the others. I know there are ways to do this, but I don't know which one to use and what works best.

 

Thanks!

 

-JC

Link to comment
Share on other sites

PHP include.

 

Rename all pages to .php, and create a header.php and footer.php and place your header and footer in those, respectively.

 

Then, at the top of every page, add:

<?php
include "header.php";
?>

 

and at the bottom..

 

<?php
include "footer.php";
?>

Link to comment
Share on other sites

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.   Paste as plain text instead

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