• Resolved Zuke

    (@zuke24)


    I know this has been brought up a few times over the years, and I’ve read through a bunch of other posts about it, but I’m never really sure how it was fixed or what I’m doing wrong. For that, I apologize.

    I have a page I want to use a different header on. So I copied the template I wanted to use and changed it so the code looks as follows:

    <?php
    /**
     * Template Name: Main Podcast, no sidebar(s)
    */
    ?>
    <?php include(TEMPLATEPATH . '/SDP-header.php'); ?>
    <?php get_header(SDP-header); ?>
    
        <div id="main-fullwidth" class="span-24">
    
        <div class="content">
    
            <?php get_template_part('loop', 'page'); ?> 
    
        </div><!-- .content -->
    
        </div><!-- #main-fullwidth-->
    
    <?php get_footer(); ?>

    I then coped the existing header file, renamed it SDP-header.php, and changed the part I wanted. The part I wanted changed worked! But now, under the secondary menu, I get the following:

    Fatal error: Cannot redeclare wp_initialize_the_theme() (previously declared in /home/stolendr/public_html/wp-content/themes/ALL_THEMES/Fives/SDP-header.php:5) in /home/stolendr/public_html/wp-content/themes/ALL_THEMES/Fives/header.php on line 10

    I’m not sure what it is I’m doing wrong. I tried editing out part of the SDP-header that was calling upon the redeclare, but then I got the original header UNDERNEATH my new header. I tried to change the new template to not have the “get_header” and that worked, but then the loop never made it below the secondary menu position.

    I’m afraid I’m sort of stumbling my way through this, so going through the links that have been previously supplied didn’t really help me much. What am I doing wrong?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Depends on the theme you are using – which is?

    Thread Starter Zuke

    (@zuke24)

    Fives, by FThemes.

    Thank you for your reply, but I think I found another way to do it.

    In case anyone else wants to know, I created a duplicate header area in my CSS that used a new image and style. I then duplicated my header.php and renamed the copy. In it, I just specified the new DIV tags from the CSS and replaced the old ones.

    In the template file itself, I replaced get_header() with <?php include(TEMPLATEPATH . ‘/SDP-header.php’); ?> and it worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom header for single page’ is closed to new replies.