• videoidget1

    (@videoidget1)


    Hi there. I am a noob WP guy with decent knowledge of hmtl/css/js. I admit my php experience is new, as I’ve never had to use it until now.

    In any event, I’m working on a site with activated Responsive Theme (CyberChimps) that requires a standard non-static front page (it works great) and three custom static pages WITH CUSTOM HEADER images to accompany.

    I’ve configured the child theme. No problem. I’ve taken the core page.php and copied/renamed into the child directory thrice, and configured the three custom page templates accordingly. Again, no problems…yet.

    My stumbling block is HOW TO GO ABOUT CONFIGURING the custom header images for each of the three pages in question? Unlike the Responsive theme’s front-page logo image(one-third width 300x100px), the three header images in question are full-width.

    I suspect what I need to do is this: 1) copy/rename header.php into my child directory three times, then 2) use

    <?php get_header(‘headerfilename’); ?>

    in each of my page-template files to call each of these three header.php files.

    If I am on the right track, then I still struggle with how to alter each header.php file accordingly to, namely the following:

    <div id=”header”>

    <?php responsive_header_top(); // before header content hook ?>

    <?php if( has_nav_menu( ‘top-menu’, ‘responsive’ ) ) { ?>
    <?php wp_nav_menu( array(
    ‘container’ => ”,
    ‘fallback_cb’ => false,
    ‘menu_class’ => ‘top-menu’,
    ‘theme_location’ => ‘top-menu’
    )
    );
    ?>
    <?php } ?>

    <?php responsive_in_header(); // header hook ?>

    <?php if( get_header_image() != ” ) : ?>

    <div id=”logo”>
    “><img src=”<?php header_image(); ?>” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”<?php bloginfo( ‘name’ ); ?>”/>
    </div><!– end of #logo –>

    <?php endif; // header image was removed ?>

    <?php if( !get_header_image() ) : ?>

    <div id=”logo”>
    <span class=”site-name”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></span>
    <span class=”site-description”><?php bloginfo( ‘description’ ); ?></span>
    </div><!– end of #logo –>

    <?php endif; // header image was removed (again) ?>

    <?php get_sidebar( ‘top’ ); ?>
    <?php wp_nav_menu( array(
    ‘container’ => ‘div’,
    ‘container_class’ => ‘main-nav’,
    ‘fallback_cb’ => ‘responsive_fallback_menu’,
    ‘theme_location’ => ‘header-menu’
    )
    );
    ?>

    <?php if( has_nav_menu( ‘sub-header-menu’, ‘responsive’ ) ) { ?>
    <?php wp_nav_menu( array(
    ‘container’ => ”,
    ‘menu_class’ => ‘sub-header-menu’,
    ‘theme_location’ => ‘sub-header-menu’
    )
    );
    ?>
    <?php } ?>

    <?php responsive_header_bottom(); // after header content hook ?>

    How do I safely strip out all this crap out of the div and replace with the simple image file?

    To clarify, all I need is three custom page templates, each with a full width png image functioning as the header. Nothing else.

    I did review every applicable codex that I could. I apologize for the long-winded nature of this question. All help is greatly appreciated.

    Best regards — bopert

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘customizing header.php files for use on multiple static pages’ is closed to new replies.