WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Ten
Custom multiple headers and sidebars (1 post)

  1. stupaul22
    Member
    Posted 3 years ago #

    1) WordPress site URL: 5280Lend.com

    2) I have created a child theme from twentyten

    3) Please refer to the GRAPHIC here:
    http://5280lend.com/wp-content/themes/5280Lend/images/sample.jpg

    4) #site-description and #site-title are set to -- diplay:none;

    5) I created a custom header and replaced the following code in header.php:
    <?php
    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
    has_post_thumbnail( $post->ID ) &&
    ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    $image[1] >= HEADER_IMAGE_WIDTH ) :
    // Houston, we have a new header image!
    echo get_the_post_thumbnail( $post->ID );
    elseif ( get_header_image() ) : ?>
    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php endif; ?>

    6) with this code:
    <div id="headTop">
    <p id="headMenu">Home | Contact Us</p>
    <h2 id="headPhone">303.220.0355</h2>
    </div>

    <div id="headLeft">
    <p id="headByline">simply call us at 303.220.0355 — Denver and Front Range Colorado mortgage solutions</p>
    </div>

    <div id="headRight"></div>

    7) I created the sidebar text widget with this code:
    <div id="formRotate"> <img src="wp-content/themes/5280Lend/images/rotate3.gif" alt="Denver mortgages"> </div>

    8) THIS IS ALL PERFECT FOR THE HOME PAGE OF MY SITE

    9) BUT ON THE BACK PAGES -- I want to replace #headerRight with #formRotate -- so the header code is this:

    <div id="headTop">
    <p id="headMenu">Home | Contact Us</p>
    <h2 id="headPhone">303.220.0355</h2>
    </div>

    <div id="headLeft">
    <p id="headByline">simply call us at 303.220.0355 — Denver and Front Range Colorado mortgage solutions</p>
    </div>

    <div id="formRotateHead"> <img src="wp-content/themes/5280Lend/images/rotate3.gif" alt="Denver mortgages"> </div>

    10) ALSO ON THE BACK PAGES -- I want #formRotate to disappear from the sidebar -- since it is now in the header.

    11) SO IN CONCLUSION -- I want two custom headers and two different sidebars.

    12) I have read a number of forum entries but not sure these are the latest solutions. What is the best way to accomplish this?

    http://wordpress.org/extend/themes/twentyten/

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags