WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Comment Template Problem... (5 posts)

  1. Mattias Tengblad
    Member
    Posted 7 years ago #

    Ok, i'm sitting here banging my head on my desk. Have a problem with my self made theme.

    First of if there are comments on a post all elements are placed right, like this: http://www.eyesx.com/?p=199

    But if there are NO comments it all get screwed up, like this: http://www.eyesx.com/?p=175

    As you can see, the sidebar gets misplaced if there is no comments. I cant figure out where to put my </div> in the comment template.

    What am I missing? Please help me in the right direction :$

    Files used for this: http://www.eyesx.com/eyesx.com_files.rar

  2. peiqinglong
    Member
    Posted 7 years ago #

    Well first thing to do is fix these errors:

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.eyesx.com%2F%3Fp%3D175&charset=%28detect+automatically%29&doctype=Inline

    so we can atleast validate and see what errors. This is the best way to figure out if you're missing a DIV or something.

  3. richarduk
    Member
    Posted 7 years ago #

    Yep, definitely a surfeit of divs today (for some reason there have been a lot of posts about things not appearing, and in each case there have been unhappy divs floating around)

    line 110 column 28 - Warning: missing </a> before <h1>
    line 112 column 1 - Warning: inserting implicit <a>
    line 113 column 9 - Warning: discarding unexpected </a>
    line 149 column 56 - Warning: replacing <p> by <br>
    line 149 column 56 - Warning: inserting implicit <br>
    line 149 column 56 - Warning: <br> element not empty or not closed
    line 166 column 9 - Warning: discarding unexpected </div>
    line 235 column 1 - Warning: discarding unexpected </div>
    
    0 errors / 8
     warnings

    In the default template, a good base to build on, comments are called from within single.php using <?php comments_template(); ?>

    This function calls comments.php

    In comments.php there are no div tags

    So all your div stuff could probably be carried out quite happily in single.php

    If you want to start using divs in comments.php just make sure that each <div> is followed somewhere by a </div>

  4. richarduk
    Member
    Posted 7 years ago #

    oops

  5. Mattias Tengblad
    Member
    Posted 7 years ago #

    Damn, this post wasn't supposed to be posted. wordpress.org did time out. Had already fixed it...

    peiqinglong, you kind of totally missed my point.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags