• I’m using a theme I built myself, first off.

    On single posts that have comments, the blog div (which contains the comments) and the sidebar div are both inside a section. This is how it’s coded. But when there aren’t comments, the sidebar div gets shoved outside of the section AND the div the section is nested under.

    I assume my loop or comments.php is broken, but I don’t see where. Another set of eyes would be awesome.

    Here’s single.php:

    [That’s really way too much code to post here – please use a pastebin per the forum guidelines.]

    Any help would be great. I’m going to put my head in the oven. K, bye.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter carolemagouirk

    (@carolemagouirk)

    Here’s what firebug shows on a uncommented post:

    <html lang="en-US" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
    <head>
    <body id="survey" class="template- survey" data-twttr-rendered="true">
    <div id="topbar1" style="top: 40; padding:0; margin:0; width: 100%; z-index: 99999;-webkit-box-shadow: 0px 5px 0px #000; -moz-box-shadow: 0px 5px 0px #000; box-shadow: 0px 5px 0px #000;">
    <div id="fb-root" class=" fb_reset">
    <script>
    <div id="nav-container" class="full-width group">
    <div id="header-container" class="full-width">
    <section class="header-media">
    <div id="blog-container" class="full-width">
    <section id="content" class="margin-width group">
    <div id="blog">
    </section>
    </div>
    <aside id="sidebar-container" style="margin-top:-10px">
    <div id="footer-container" class="full-width">
    </body>
    </html>

    The aside gets knocked out of the section and #blog-container div.

    ??? 🙁

    Please repost that to a pastebin per the forum rules:

    http://codex.wordpress.org/Forum_Welcome#Posting_Code

    Thread Starter carolemagouirk

    (@carolemagouirk)

    Thread Starter carolemagouirk

    (@carolemagouirk)

    Fixed it.

    In my comments.php I commented out the line:
    <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->

    but I didn’t comment out the php.
    Simple fix. Like they always seem to be because I’m sloppy.
    <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php// echo allowed_tags(); ?></code></small></p>-->

    Sorry for posting too much code in the beginning. Lesson learned on both fronts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sinle.php loop breaks without comments’ is closed to new replies.