Title: Modified header
Last modified: August 19, 2016

---

# Modified header

 *  Resolved [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/modified-header/)
 * I made a new template and wish to modify ( simplify )the header for this series
   of template(s). i modified the code in header.php and made another file header2.
   php.
 * then within the template i called get header2() and got an error message = call
   to undefined functions. i knew this was too simple and the good news, i guess,
   i predicted this error message. can anyone point me in right direction or is 
   this way too theme specific?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [chaoskaizer](https://wordpress.org/support/users/chaoskaizer/)
 * (@chaoskaizer)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/modified-header/#post-878555)
 * FYI get_header function only load “header.php”. You can try the below code to
   load your custom header template.
 *     ```
       <?php // add inside functions.php
       function get_template_header($filename='header'){
   
        $file = TEMPLATEPATH.DIRECTORY_SEPARATOR.$filename.'.php';
   
        if ( file_exists( $file ) ){
            if (has_filter('get_header')) do_action('get_header');
            load_template( $file );
        } else {
            get_header();
        }
       }
       ?>
       ```
   
 * usage
 *     ```
       <?php get_template_header('header2'); // get header2.php ?>
       ```
   
 *  Thread Starter [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/modified-header/#post-878558)
 * hello chaoskaizer. thank you.
 * i dropped your code into functions.php and then replace my “get header” code 
   with your usage code into my new template. did not work… i think i did it right.
 *  Thread Starter [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/modified-header/#post-878563)
 * i tried replacing this…
 * <?php get_header(); ?>
 * with this…
 * <?php include (TEMPLATEPATH . ‘header2.php’); ?>
 *  Thread Starter [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/modified-header/#post-878625)
 * here is the fix!
 * chaoskaizer, thank you again. the code above was provided by the theme developer.
   i just noticed that the ” / ” was missing…
 * <?php include (TEMPLATEPATH . ‘/header2.php’); ?>
 *  Thread Starter [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/modified-header/#post-878644)
 * new challenge on header2.php…
 * i wish to simplify a nav bar that has 10 category titles on it and wish to display
   only four.
 * the existing code =
    `wp_list_categories('title_li='); ?>`
 * i tried this =
    `<?php wp_list_categories('title_li=' . 'exclude=4,27,32,33,82,147');?
   > <!-- 10/12/08 -->`
 * got an error = Parse error: syntax error, unexpected
 *  Thread Starter [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/modified-header/#post-878902)
 * this works!
 * <?php wp_list_categories(‘title_li=&exclude=27,32,33,144,147’); ?> <!– 11/15/
   08 –>

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Modified header’ is closed to new replies.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)

 * 6 replies
 * 2 participants
 * Last reply from: [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * Last activity: [17 years, 6 months ago](https://wordpress.org/support/topic/modified-header/#post-878902)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
