Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter crankybeardesign

    (@crankybeardesign)

    Nevermind, I’ve got it. For any other poor bastard out there having a similar problem, here’s what happened.

    I had added a styling div in the comments.php file. Since I don’t know php, I didn’t realize that closing the div at the bottom of the page only closed the div when one of the possible cases was true (i.e. there were comments). Adding close div tags to the other possible cases, as below, solved the issue:

    <?php else : // this is displayed if there are no comments so far ?>
    
    			<?php if ('open' == $post->comment_status) : ?>
    			<!– If comments are open, but there are no comments. –>
    			<p><b><?php comments_number('No comments yet', 'One comment', '% comments' );?> on “<?php the_title(); ?>”</b></p>
    			</div>
    			<?php else : // comments are closed ?>
    			<!– If comments are closed. –>
    			<p><b>Comments are not allowed on “<?php the_title(); ?>”</b></p>
    			</div>
    		<?php endif; ?>
    		<?php endif; ?>

    I was really tearing out my hair for about an hour there…

    I have the same problem and I really thought this would work, but unfortunately it didn’t.

    I had the same problem with the default design. By this i mean that when i click on a post, to make some comment, the sidebar doesn’t appear.

    Here is what i’ve done to make it more user friendly (showing the sidebar). Please note that this works for the default design.

    1/ make the sidebar appear
    in your admin menu / appearance / editor, select your template (default) and then single post (single.php).

    At the bottom of this file, just before this line : <?php get_footer(); ?>
    add this one : <?php get_sidebar(); ?>

    2/ now you have to make your design on two columns :
    on the same file but at the top you’ll find this line : <div id="content" class="widecolumn" role="main">

    replace it by this one : <div id="content" class="narrowcolumn" role="main">

    hope it will help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sidebar drops down when no comments’ is closed to new replies.