Code Snippets

How To Include The Same Menu, Header, and Footer On All Your Web Pages

37 comments Written on January 12th, 2011 by
Categories: Code Snippets
How To Include The Same Menu, Header, and Footer On All Your Web Pages

When new to HTML and making your own websites, everyone always runs into the same problem at some point in the site’s evolution. Once you have many pages on your site, you realize how annoying it can be to make a simple change, for example to add an item to your menu, across every single page of your site. That’s the point that all budding webmasters wonder if there’s an easier way. And of course, there is.

The best answer is to use Server Side Includes, which can be accomplished in various ways. I recommend using PHP includes, because if … Read the rest

How To Automatically Update Copyright Year In Your Site’s Footer

1 Comment » Written on January 7th, 2011 by
Categories: Code Snippets
How To Automatically Update Copyright Year In Your Site’s Footer

Let’s say your website began its journey on the web in 2005. When you built your site back then, you placed a little bit of text in the footer that said Copyright 2005. In 2006, you dutifully remembered to update that text on January 1st, so it read Copyright 2005 – 2006. After that, you forgot all about it. Years later, when people visit your site, they see that you haven’t changed that ending date in years. They immediately assume your site hasn’t been updated since 2006, and is old and stale. Although that may not be accurate, it’s the … Read the rest