• I have been altering the twenty ten theme recently, mostly just the colour but i have also moved the menu to above the header and added a search box. I’m not sure when exactly it happened but for some reason the white wrapper works fine on the home and the posts page, extending from the top to the bottom. But on all other pages it stops just under the header and the main content is against the background.

    this is the site https://sme10.webactivate.ie/about/ although i don’t think just anyone can access it right now.

    I know I should be working on a child theme but for now thats not possible. Would really appreciate some advice!

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’d be most helpful if people can see the page to find out where it’s gone wrong.

    Thread Starter steppers

    (@steppers)

    i know but i really can’t do anything about that at the moment unfortunately ??

    I only made changes to stylesheet and header.php. The wrapper ends at bottom of the header on every page that isn’t home or posts page. I can still alter margin, padding etc but this just pushes page content further down. The wrapper div starts before header and ends after footer.

    What’s different about the format of the home and posts page from all other pages? I think that’s where the problem must lie.

    This is my header code:
    <?php
    /**
    * The Header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id=”main”>
    *
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0
    */
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
    <title><?php
    /*
    * Print the <title> tag based on what is being viewed.
    */
    global $page, $paged;

    wp_title( ‘|’, true, ‘right’ );

    // Add the blog name.
    bloginfo( ‘name’ );

    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( ‘description’, ‘display’ );
    if ( $site_description && ( is_home() || is_front_page() ) )
    echo ” | $site_description”;

    // Add a page number if necessary:
    if ( $paged >= 2 || $page >= 2 )
    echo ‘ | ‘ . sprintf( __( ‘Page %s’, ‘twentyten’ ), max( $paged, $page ) );

    ?></title>
    <link rel=”profile” href=”https://gmpg.org/xfn/11&#8243; />
    <link rel=”stylesheet” type=”text/css” media=”all” href=”<?php bloginfo( ‘stylesheet_url’ ); ?>” />
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />
    <?php
    /* We add some JavaScript to pages with the comment form
    * to support sites with threaded comments (when in use).
    */
    if ( is_singular() && get_option( ‘thread_comments’ ) )
    wp_enqueue_script( ‘comment-reply’ );

    /* Always have wp_head() just before the closing </head>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to add elements to <head> such
    * as styles, scripts, and meta tags.
    */
    wp_head();
    ?>
    </head>

    <body <?php body_class(); ?>>
    <div id=”wrapper” class=”hfeed”>
    <div id=”header”>
    <div id=”masthead”>
    <div id=”branding” role=”banner”>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>
    <h1 id=”site-title”>
    <span>
    ” rel=”home” title=”<?php bloginfo(‘name’);?>”>
    <img src=”
    https://sme10.webactivate.ie/wp-content/uploads/2010/10/g3791.png&#8221; alt=”Total Media 4 U logo” />

    </span>
    </h1><!–end of h1 site-title–>

    <div id=”site-description”><?php bloginfo( ‘description’ ); ?></div>
    <!– Search Box Begin–>
    <div class=”header-search”>
    <form method=”get” id=”navsearchform” action=”<?php bloginfo(‘url’); ?>/”>
    <input type=”text” class=”search-text” value=”Search this site… ” name=”s” id=”headersearchbox” onfocus=”if (this.value == ‘Search this site… ‘) {this.value = ”;}” onblur=”if (this.value == ”) {this.value = ‘Search this site… ‘;}” /><input type=”image” src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/search-button.png” value=”Search” alt=”Go” />
    </form>
    </div>
    <!– Search Box End –>
    <div id=”access” role=”navigation”>
    <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    <div class=”skip-link screen-reader-text”>“><?php _e( ‘Skip to content’, ‘twentyten’ ); ?></div>
    <?php /* Our navigation menu. If one isn’t filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
    <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
    </div><!– #access –>
    </<?php echo $heading_tag; ?>>

    <?php
    // Check if this is a post or page, if it has a thumbnail, and if it’s a big one
    if ( is_singular() &&
    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, ‘post-thumbnail’ );
    else : ?>
    <img src=”<?php header_image(); ?>” width=”<?php echo HEADER_IMAGE_WIDTH; ?>” height=”<?php echo HEADER_IMAGE_HEIGHT; ?>” alt=”” />
    <?php endif; ?>
    </div><!– #branding –>

    </div><!– #masthead –>
    </div><!– #header –>

    <div id=”main”>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrapper problem only on certain pages’ is closed to new replies.