Use the same header for multiple pages

1 reply · opened Nov 15, 2020

IIntensivedesignNov 15, 2020

I want to build a (static) website which consists of 20 pages.

I know which header I want and I also want to remove the shopping cart. What is the quickest way to change this for all the 20 pages? Or do I have to modify each seperate page to do so?

Thanks in advance.

SSemicolon WebSTAFFNov 15, 2020

Hello,

Unfortunately, since this is an HTML Template, you will need to change the Files individually and you will need to manually copy/paste the HTML Codes for the Headers/Footers to all the Templates.

However, this is Definitely Possible by having a Centralized File for the Menu and this can be achieved easily using PHP. Please use the following steps:

  1. Change the .html Extension of your files to .php .

  2. Create a File named header.php and add the Header Codes to it.

  3. Then, include this file in the Header Area. Example:
    [ch_pre type="php"]<?php include('header.php'); ?>[/ch_pre]

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard