How to add different header for every page

10:12:00 0 Comments A+ a-

Many time we want to make a different type of header for inner pages . Which is totally different to the home page header. Some time we want to add banner image for every inner page of out website.
Its very simple to do.
 There is two way to do this job. First with wordpress page. Second is with simple php page.

Without PHP method

 Step1 - Firstly copy your theme header.php file and paste with the same location with different   name. Like i want to make a different header for About page. Then you just make a copy of header.php and rename it with the name header-about.php. Its compulsory to make your header name with same format with ( - ) this sign.

 exm-
           header-contact.php.

  Step2 - Open your page where you want to show your header and paste the code given below.

You just have to put the title after ( - ) this sign. Like if my page name is services then just replace the word about into services 
 
With PHP

Its so simple then first way of changing header. In this way you just give a condition according to your page title.

Paste this code in your header.php file. you can use slug name of the page also in place of page title.