• Resolved glenngeiger

    (@glenngeiger)


    Thanks for reading,

    The troubled blog at https://neatlydesigned.com is a mod of the default theme.

    It seems like index.php won’t close <div> tags properly, but only sometimes. For example, the home page (which uses index.php) looks fine, but clicking on the ‘Older Entries’ link at the bottom shows a broken layout. After running validation, I see that a </div> is missing. I’ve combed through it, but it doesn’t add up that it would only happen on the ..page/2/ page.

    I’ve tried throwing in the random </div> and it works, but will break something else, so it’s not a fix.

    Quick extra word, WordPress has been excellent to work with.

    Any ideas on this one?

Viewing 6 replies - 1 through 6 (of 6 total)
  • whooami

    (@whooami)

    It seems like index.php won’t close <div> tags properly, but only sometimes.

    its caused by themes using index.php to display single post pages and not taking the comment form (or lack of) into consideration during theming.

    I have a buck that says of you change to the default theme, you wont see that problem. Contact whomever is responsible for your theme.

    Thread Starter glenngeiger

    (@glenngeiger)

    Contact whomever is responsible for your theme.

    Sadly, I’m the one responsible for my theme! It’s the default theme with some modification.

    I now switched over to the actual default theme, just for kicks, and it’s still broken.

    I see your buck, and I raise you a buck.

    Thread Starter glenngeiger

    (@glenngeiger)

    I just thought about it, and my modified theme, like the default, doesn’t use index.php to display single pages.

    page.php is handling that.

    Any other ideas?

    Thread Starter glenngeiger

    (@glenngeiger)

    Just realized 2 things:

    1. I’m mistaken, it’s single.php that handles the SINGLE pages (I know that… now.)
    2. There was something up with the formating of one of my posts on the second page. That’s what I get for letting my customer paste from Word.

    Done!

    whooami

    (@whooami)

    I owe you a buck ??

    Thread Starter glenngeiger

    (@glenngeiger)

    I know this is done already, but I thought I’d post what the actual problem was.

    When copying and pasting text into a post it’s a good idea to check the HTML tab to see what the pasted text looks like. In my case, it managed to bring over a few <div> tags, left one of them open, and so destroyed my layout whenever that post appeared on the page.

    Before you pull your hair out, commenting out parts of your templates and adding extra closing tags, check the HTML of your posts!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Template pages leave open div tag, sometimes!’ is closed to new replies.