WordPress.org

Support

Support » Themes and Templates » Comments pushed into top of sidebar

Comments pushed into top of sidebar

Viewing 15 replies - 1 through 15 (of 41 total)
  • WPyogi

    @wpyogi

    Forum Moderator

    Thanks for the reply.

    I had a look at those errors and I have fixed the relevant ones, however, none seem to fix my problem or relate to the comment section.

    Any ideas?

    WPyogi

    @wpyogi

    Forum Moderator

    Looks like you have an extra div right above this line:

    <h4>One Comment</h4>

    and then you need to add a closing div before this line:

    <div id="sidebar">

    I can’t seem to find the code: <h4>One Comment</h4> because isn’t in my actual wordpress theme code? (since it was a comment added on rather than code that was input for the theme I’m guessing)

    WPyogi

    @wpyogi

    Forum Moderator

    You’d need to look in the template (php) file for that page — where it is calling the comments.php file (if that’s how your theme is set up).

    Oh ok, where is this template php file located?

    I do have a comments.php file yes, and this problem is occuring to not only this page, but all for all my article pages.

    WPyogi

    @wpyogi

    Forum Moderator

    It’s generally one of the regular files – but since that’s a custom theme, I can’t tell you specifically. Did you design the theme? If not, you should go to whoever did for help.

    I did design the theme yes, and I’ve got all the required php files.

    Ok, I managed to delete the extra div before <h4>One Comment</h4> and I added a closing div before <div id="sidebar">. That fortunately fixed the problem, and now the comments are under my posts. However, my sidebar has also gone down with it and is now under the comments.

    Sorry if this seems simple, I’m just a bit new to this and confused!

    (my sidebar has shifted into the main content area on the homepage)

    WPyogi

    @wpyogi

    Forum Moderator

    Looks like you are still missing a closing div before the sidebar div.

    Are you using Firebug to work on these issues? You definitely should be — it makes it much, much easier to look at the code and see what is going on and to test changes in the browser window.

    It also looks like you are missing a closing body tag – which may not be causing problems, but is not good coding…

    I have been editing the code just using textwrangler for mac. However it’s hard to see the code as its all split up header/sidebar/footer/index/page/single etc. I’ve been trying to insert a closing div on my index.php file right above the ‘get_sidebar’ at the bottom.
    Is this right?

    Should I download firebug instead?

    Also, my closing body tag is at the end of my footer.php file. This is correct, no?

    I really appreciate this help!

    Sorry, I put all my code from header/index/sidebar/footer.php together so I can see where I’ve gone wrong, and I see (as you have stated) that the body is not closed. There are also a lot of div’s that aren’t closed… but I’m having a lot of trouble locating why, because I have the closed div tags but they don’t appear to be closing anything.

    Validate your site through validator.w3.org , you are using duplicate ids too.

    Make a single div and put blog posts on that div.

    Which of my ids are duplicates? Meaning that I have 2 div id’s with the same name? I can’t seem to find them…

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘Comments pushed into top of sidebar’ is closed to new replies.