0

My website has only one header. I want to change it with that of Wordpress, for example, because It has an address with a logo at the top and then menu bar.

How can I add that template to mine?

1

Use custom header-templates.

create a file for example "header-home.php". Put your code in it and then get it by using <?php get_header('home'); ?>

You can also use header-templates inside a other header-template. Lets say you have the top navigation. You want it in all headers. Then put the code for this in your header.php. Then in for example header-home.php you write:

<?php get_header(); ?> // Loads your header.php
// Some code here

And then in for example your index/home file you put only the code <?php get_header('home'); ?>

  • Sorry! I am completely new to wordpress. this is the information in the header php. I wonder how I can add "department of linguistics" at top of my current header. – John Sep 7 '15 at 17:01
  • <?php /** * The header for our theme. * * Displays all of the <head> section and everything up till <div id="content"> * * @package Tesseract */ ?><!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="profile" href="gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> <?php wp_head(); ?> </head> – John Sep 7 '15 at 17:01
  • Just use regular HTML/CSS – Alex Sep 7 '15 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.