WordPress.org

Ready to get started?Download WordPress

Forums

Comments pushed into top of sidebar (42 posts)

  1. jeffrey_huynh
    Member
    Posted 1 year ago #

    Hi there,

    http://www.highondesign.co.uk/10-creative-cv-examples-that-strike-the-perfect-balance/

    For some reason, my comments seemed to be placed at the top of my sidebar instead of directly under my actual post, however the actual comment box is where I want it to be (under the post). Not quite sure why this is happening!

    My sidebar is also pushed down on my 'category' pages: http://www.highondesign.co.uk/category/articles/

    I would really appreciate any help!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

  3. jeffrey_huynh
    Member
    Posted 1 year ago #

    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?

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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">
  5. jeffrey_huynh
    Member
    Posted 1 year ago #

    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)

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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).

  7. jeffrey_huynh
    Member
    Posted 1 year ago #

    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.

  8. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  9. jeffrey_huynh
    Member
    Posted 1 year ago #

    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!

  10. jeffrey_huynh
    Member
    Posted 1 year ago #

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

  11. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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...

  12. jeffrey_huynh
    Member
    Posted 1 year ago #

    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?

  13. jeffrey_huynh
    Member
    Posted 1 year ago #

    I really appreciate this help!

  14. jeffrey_huynh
    Member
    Posted 1 year ago #

    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.

  15. zebrathemes
    Member
    Posted 1 year ago #

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

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

  16. jeffrey_huynh
    Member
    Posted 1 year ago #

    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...

  17. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    I don't see any on that page either, but you should clear up some other errors. And you absolutely should be using the alt attribute for images on your site -- for SEO and for people using readers to access your site.

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.highondesign.co.uk%2F10-creative-cv-examples-that-strike-the-perfect-balance%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

  18. zebrathemes
    Member
    Posted 1 year ago #

    How you don't see? check this page

    http://www.highondesign.co.uk/category/articles/

    #content is duplicate all along.

  19. zebrathemes
    Member
    Posted 1 year ago #

  20. jeffrey_huynh
    Member
    Posted 1 year ago #

    That page shows all the different articles I have though? (which is what I intended)

    I'm currently sifting through my code and correcting the errors. I'll write back to let you know how it goes! :)

  21. jeffrey_huynh
    Member
    Posted 1 year ago #

    I see that my #content has a duplication error, however, I cannot find in my template files where exactly this is happening! I have only used #content once it seems!

    Confused :S

  22. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    My bad on the above -- but if you just change the content from ID to class, (and change any CSS as well), that may solve it.

  23. jeffrey_huynh
    Member
    Posted 1 year ago #

    Ah yes that did solve the duplicate problem... now it's saying lots of .content is unclosed? But I don't know where :(

    Sorry to be a pain! Is there a way of tracking down the exact line number and column in my code so that I can find the source of the problem quicker?

  24. jeffrey_huynh
    Member
    Posted 1 year ago #

    The actual page with the article is fine now.. it's just the category page: http://www.highondesign.co.uk/category/articles/ that is messed up.

  25. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Nope, line numbers in rendered HTML are not relevant to the php code. But you should be able to look carefully in the php and find it. That's likely what's making the content sections run off to the right...looks like the missing one is at the end of the content loop.

  26. jeffrey_huynh
    Member
    Posted 1 year ago #

    Really appreciate this help!

    I added a closing div at the end of the content loop and it fixed one of the .content unclosed errors. So I added more closing divs to match the number of errors given and now the errors have gone. Why did I have to do this? Does it relate to the amount of individual posts I have? I

    t doesn't seem right to add so many closing divs after the content loop..

    My wrapper id also seems unclosed as well as the body.

  27. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    If your php is coded correctly, it should not make any difference how many posts you have. If it does, something is not right in the loop -- perhaps that the closing div needs to be inside the loop. The wrapper and body closing tags are generally in the footer.php file - at least that's how most themes are coded. Since yours is custom, can't say for sure.

  28. jeffrey_huynh
    Member
    Posted 1 year ago #

    Hmm I've put one closing div inside the loop instead and its worked.

    The sidebar is still shifted down on only these category pages....
    I'm not too sure what 'stray end tag div' means as its come up twice as errors...

  29. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    In Firebug, it shows two extra closing divs right above the sidebar.

  30. jeffrey_huynh
    Member
    Posted 1 year ago #

    Am I right in getting rid of the closing divs above the 'get_sidebar' at the bottom of my index/page/single.php files?

    Doing this doesn't however change this page, but makes my page even more messed up....

    Firebug doesnt tell me that i have 2 extra closing divs right? Is this through your own knowledge?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.