WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar below content (10 posts)

  1. GWAVE23
    Member
    Posted 3 years ago #

    Hi,

    When logged in to the site it looks fine when viewing a post but when logged out/viewing as a guest the sidebar goes under the post and the footer comes up the side.

    I have read various posts on here and validated my site but I didnt understand where the errors were and how to fix them.

    Can someone please help me out? My site address is http://www.gwave23.com

    Thanks

  2. GWAVE23
    Member
    Posted 3 years ago #

    It only happens for users not logged in.

  3. Samuel B
    moderator
    Posted 3 years ago #

    that's not happening to me in FF-latest and Chrome

    you do have 2 missing </p> tags in sidebar content

  4. GWAVE23
    Member
    Posted 3 years ago #

    Thanks I have sorted the </p> tags.

    I get the issue in IE, FF and Chrome.

    Any idea why? And why it only happens when logged out?

    I have just had a couple of people check the site as well and they get the same issue

  5. the issue is in single posts.

    it seems that there is one closing div </div> missing before the call of the sidebar;
    - this could come from single.php or from the comment area which is slightly different for logged-in users (although the static page 'contact' is fine despite probably using the same comments.php file)

    check single.php and comments.php for a match of opening/closing divs; this is more complicated by the conditional statements in that code.

  6. GWAVE23
    Member
    Posted 3 years ago #

    My knowledge in php is not that good. I have had a look and it seems in single.php there is 5 opening divs and 4 closing divs.

    I may be wrong, but, I don't know where to add the missing closing div tag. Can anyone help?

    single.php

    [code moderated per forum rules - please follow the guidelines in http://codex.wordpress.org/Forum_Welcome#Posting_Code when posting code]

    comments.php

    [dito]

  7. the </div> in this section is in the wrong position (it only gets used if the user is logged in):

    <?php endif; ?>
    			</div><!--wrong position-->
    			<div class="res_2 fright">

    it should be here:

    <?php endif; // If registration required and not logged in ?>
                    </div><!--this moved to here-->
    </div>
    <?php endif; // if you delete this the sky will fall on your head ?>

    edited comments.php:
    http://pastebin.com/f6HkG1YY

    hope this works ;-)

  8. GWAVE23
    Member
    Posted 3 years ago #

    Oops sorry I forgot to use pastebin!

    That works now and the sidebar is in the correct place, thanks! :)

    One problem though, the comments box/submit button have messed up.

    Login and and have a look

    User: Test
    Pass: tester321

  9. just wondering: is that the original comments.php from the theme?

    it seems to have invalidly nested form and div tags.

    i hope i got the idea how it was meant to be;
    try (both logged in and logged out):

    http://pastebin.com/hrQmkHhc

  10. GWAVE23
    Member
    Posted 3 years ago #

    You my friend are a legend! It works perfectly now, thanks a lot!

    That was the original comments.php, the only thing edited was "No Responses" etc were changed to "No Comments" etc so no changes apart from those words.

    Thanks so much for your help. Much appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic