Support » Plugins » header image slider code help

  • I have the 20/11 theme (newest one) and I want to add a responsive slider to the header, so with research I downloaded WP Nivo slider and Header Image Slider plugins for my WP install.
    I did all the admin panel configurations for the slider in the Nivo slider settings/options then I went to Appearance/header and check the radio button for “slider” then hit settings, from there its a box that pops up telling you to use the boom_header_image() since the “auto insert” feature does not work for this theme. From there all hell broke loose lol.

    I placed ” boom_header_image()” tag nested in php in the “branding” div section of header.php (i’ll show code below). And now I see the slider but the search box is nested in the slider image when you scroll through the images (not good), and the primary (default) navigation is pushed all the way down with a large broken img link above it. I just want the slider to replace the static header images that were there before with the same dimensions and have the navigation right under the slider as the original theme looked before I added/made these changes. Please help me I know I must need to comment more code out but I don’t know which to comment/remove. Also, the slider is NOT responsive when I scale the browser down and up, any tips?

    To see what it looks like now jacked up visit museum

    code looks like this now w/ boom_header_image tag included

    <header id="branding" role="banner">
        			<?php boom_header_image() //added for nivo slider in header 8/14 ?>
    				<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><span class="tcpt-logo"><?php bloginfo( 'name' ); ?></span></a></span></h1>
    				<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    				// Check to see if the header image has been removed
    				$header_image = get_header_image();
    				if ( ! empty( $header_image ) ) :
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    					// The header image
    					// 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 ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
    							$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; // end check for featured image or standard header ?>
    			<?php endif; // end check for removed header image ?>
    				// Has the text been hidden?
    				if ( 'blank' == get_header_textcolor() ) :
    				<div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
    				<?php get_search_form(); ?>
    				else :
    				<?php get_search_form(); ?>
    			<?php endif; ?>
    			<nav id="access" role="navigation">
    				<h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
    				<?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
    				<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
    				<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></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( 'theme_location' => 'primary' ) ); ?>
    			</nav><!-- #access -->
    	</header><!-- #branding -->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘header image slider code help’ is closed to new replies.