Skip to main content
Participant
December 15, 2016
Answered

Help with Header and Footer...

  • December 15, 2016
  • 1 reply
  • 986 views

Hello!

I am hoping that someone can help me out with an issue I have been having with a header and footer.

I previously added a header and footer to all of the main pages on my website and it was working fine. Somewhere along the way though it has stopped working.

Here is the Header - http://www.glennbartley.com/naturephotography/Header-Test.html

http://www.glennbartley.com/naturephotography/Header-Test.html

And the Footer -

http://www.glennbartley.com/naturephotography/Footer-Test.html

I had them working on all of the main pages on my site such as:

Nature Photography by Glenn Bartley - About Me

Nature Photography Articles by Glenn Bartley

So where did they go? Is there some code interfering? Or something I need to add to make them work again?

Thank you so much for any help that you can offer to get these back up and running!

Glenn

    This topic has been closed for replies.
    Correct answer Nancy OShea

    Fix your code errors.

    [Invalid] Markup Validation of http://www.glennbartley.com/about.htm - W3C Markup Validator

    Just to be clear, are you using server-side includes for your site wide header and footer?

    HTML files don't usually parse include files unless your server is configured to do so.   Some shared hosting plans prohibit parsing .html or .htm files as .php because it slows the server down.

    I have created a brief tutorial below on the use of PHP includes.

    Alt-Web Design & Publishing: Server-Side Includes with PHP

    1 reply

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    December 15, 2016

    Fix your code errors.

    [Invalid] Markup Validation of http://www.glennbartley.com/about.htm - W3C Markup Validator

    Just to be clear, are you using server-side includes for your site wide header and footer?

    HTML files don't usually parse include files unless your server is configured to do so.   Some shared hosting plans prohibit parsing .html or .htm files as .php because it slows the server down.

    I have created a brief tutorial below on the use of PHP includes.

    Alt-Web Design & Publishing: Server-Side Includes with PHP

    Nancy O'Shea— Product User & Community Expert
    barts5Author
    Participant
    December 15, 2016

    So you think it is because of those code errors?

    Or perhaps my web host changed its policy to no longer show them?

    I have a VERY basic knowledge of code. So go easy on me!

    Thanks!

    Glenn

    Nancy OShea
    Community Expert
    Community Expert
    December 15, 2016

    When things go south, 98% of the time it's code related; not server related.  Browsers don't like code errors.  And if the errors are critical, your pages won't render at all. 

    In your About Me page, I'm seeing  PHP code which should never be visible, multiple <body> and <head> tags.  You've got <script> and <style> tags scattered all over the place.  It's like a badly packed suitcase.   Everything's there but it's not organized.   HTML has a few strict rules about where things can and cannot go. 

    In HTML5, it's like this:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Title of the document</title>

         <style>     CSS goes here </style>

         <script>    Javascript goes here  </script>

    </head>

    <body>

         Web Page content goes here....
    </body>
      </html>

    In a nutshell. 

         1 doctype.

         1 set of <html> tags. 

         1 set of <head> tags.

         1 set of <title> tags.

         1 set of <body> tags.

    Nancy

    Nancy O'Shea— Product User & Community Expert