WordPress.org

Support

Support » How-To and Troubleshooting » Sidebar moves down

Sidebar moves down

  • hi friends,i have blog named http://www.guddoz.com and since last week whenever i click on any post and it opens in a single page ,then my sidebar moves down.My sidebar is ok at homepage,category and archievs page.please suggest me solution soon as it looks weird. thanks…

Viewing 15 replies - 1 through 15 (of 23 total)
  • This is happening because of how your code is structured
    on your single post page
    <div class=”span-8 last”>
    is nested under <div class=”span-16″>
    (span-16 class contains your main content-body)
    (span-8 class contains your sidebar)

    where as on your main page it they are not nested which allows your sidebar to easily float on right side
    you would have to structure the single post page correctly

    Please robin tell me how can i structure the single post correctly.please reply.

    keep a backup of your files,
    and for your single post page (usually its single.php) but i dont know how your theme is structured.
    you just have correct the closing of the div
    and make sure that div class=”span-8″ is not nested under <div class=”span-16″>
    refer to the code to your archive page or any other page you mentioned which are working fine.

    or you can contact theme developers and report a bug issue

    [ Moderator note: It’s the backtick character and not the single quote for code. Or use the code button. Also? If you use pastebin.com instead of posting large code here, you get the magic of line numbers. ]

    <?php get_header(); ?>
    	<div class="span-24" id="contentwrap">
    			<div class="span-16">
    				<div id="content">
    					<?php if (have_posts()) : ?>
    						<?php while (have_posts()) : the_post(); ?>
    						<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    							<h2 class="title"><?php the_title(); ?></h2>
    							<div class="postdate"><img src="<?php bloginfo('template_url'); ?>/images/date.png" /> <?php the_time('F jS, Y') ?> <img src="<?php bloginfo('template_url'); ?>/images/user.png" /> <?php the_author() ?> <?php if (current_user_can('edit_post', $post->ID)) { ?> <img src="<?php bloginfo('template_url'); ?>/images/edit.png" /> <?php edit_post_link('Edit', '', ''); } ?></div>
    
    							<div class="entry">
    <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(300,225), array("class" => "alignleft post_thumbnail")); } ?>
    								<?php the_content('Read the rest of this entry »'); ?>
    								<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    							</div>
    							<div class="postmeta"><img src="<?php bloginfo('template_url'); ?>/images/folder.png" /> Posted in <?php the_category(', ') ?> <?php if(get_the_tags()) { ?> <img src="<?php bloginfo('template_url'); ?>/images/tag.png" /> <?php  the_tags('Tags: ', ', '); } ?></div>
    
    							<div class="navigation clearfix">
    								<div class="alignleft"><?php previous_post_link('« %link') ?></div>
    								<div class="alignright"><?php next_post_link('%link »') ?></div>
    							</div>
    
    							<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    								// Both Comments and Pings are open ?>
    								You can <a href="#respond">leave a response</a>, or <a>" rel="trackback">trackback</a> from your own site.
    
    							<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    								// Only Pings are Open ?>
    								Responses are currently closed, but you can <a> " rel="trackback">trackback</a> from your own site.
    
    							<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    								// Comments are open, Pings are not ?>
    								You can skip to the end and leave a response. Pinging is currently not allowed.
    
    							<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    								// Neither Comments, nor Pings are open ?>
    								Both comments and pings are currently closed.
    
    							<?php } edit_post_link('Edit this entry','','.'); ?>
    						</div><!--/post-<?php the_ID(); ?>-->
    
    				<?php comments_template(); ?>
    
    				<?php endwhile; ?>
    
    				<?php endif; ?>
    			</div>
    			</div>
    		<?php get_sidebars(); ?>
    	</div>
    <?php get_footer(); ?>

    this is my single.php code,please tell where i have to change the code.

    please paste it using pastebin its hard to even see it like this

    The ‘sidebar moves below content’ issue is common when editing Template files and unnecessarily closing-off one HTML <div> element.

    In your single.php code file, try removing one </div> before <?php get_sidebars(); ?>.

    did you check your code from archive or other pages which are working fine, compare both the files

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    Gudoz, If someone can help you that would be great. But please be aware that the theme you are using is from a non-GPL source and those are not welcome here.

    Your chosen theme is not released under GPL. Non GPL products are not welcome in the WordPress community. Official WordPress policy states that all plugins and themes that are publicly released are required to adhere to http://wordpress.org/about/gpl/

    Any support requests for non-GPL products are usually ignored, in the interests of supporting the community and its freedoms.

    Please consider using a theme that is compatible with the GPL instead.

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

    HI robin ,i have checked archive.php but i am not able to sort out the error.

    hi andrew i have removed the `</div> but it did not solved my problem.

    as jan said this forum is for supporting GPL themes, since you bought a paid theme you it would be idle to contact the theme developer as i see on there demo it works perfectly

    hi robin i have changed theme and viewed in preview but it also shows sidebar down.please suggest me, whether I have to reinstall wordpress or anything else i have to do.

    hi
    you would have to find the page from which your single post is generated in your theme and as from firebugging your website i could see that

    <div class=”span-8 last”>
    is nested under <div class=”span-16″>
    (span-16 class contains your main content-body)
    (span-8 class contains your sidebar)

    which is causing the sidebar to shift down

    please tell me how can i remove this error

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Sidebar moves down’ is closed to new replies.
Skip to toolbar