• Resolved nellee

    (@nellee)


    Hi, i too have the problem with the egecia theme, when you create a new post, with no comments, then go to the posted page, the style is broken, anyone have any ideas or fixes…?
    This is not a bug from adapting the theme, the error is in the master template of the theme when downloaded from the source.
    https://www.blackberrycomms.com/wordpress
    for examples, view a post with no comments.
    any help appriciated.
    thanks
    Paul

Viewing 5 replies - 1 through 5 (of 5 total)
  • Comparing the source code between commented and uncommented posts, it looks as though there’s an opening <div> missing. If you view the source code and look for, <!-- You can start editing here. -->, you can see that the commented page goes to, <div id="comments">, whereas the uncommented page has another html comment, then goes straight to the html for your comment form.

    I haven’t got the theme to try and see where that might be missing from, but maybe the above will give you a clue as to where to start looking. Or, of course, I could be way off.

    Thread Starter nellee

    (@nellee)

    Paul
    many thanks, that was the problem, you are a genius, dont know how i missed it.
    Thanks
    Paul

    I was able to see <div id=”comment”>, but still am not able to fix the problem. Could anyone say what exactly has to be done to correct this problem? Thanks in advance.

    Any chance you could post up what you did to solve this so that others with the problem can sort it out. I arrived here from google so this is the page most will drop on for the answer.

    I too encountered this problem with the Egecia 1.2 template for WordPress. After searching all over for an answer, I decided to dig into the code a bit to see if I could find the problem.

    It seems as if there’s a closing DIV on the comments.php that should be conditional. When there are no comments, this closing DIV becomes an extra tag, which breaks the layout.

    This may not be the very best way to fix the template, but it seems to be working fine on at least 2 of my clients’ blogs that I just applied the fix to.

    Here’s what you do:

    Open up the comments.php template in the WordPress Theme Editor and scroll to the very bottom of the code. You will see a closing </div> tag on the third line from the bottom. Simply replace the tag with the following:

    <?php if ($comments) : ?>
    </div>
    <?php endif; ?>

    (or just wrap the PHP around the existing tag – same diff.)

    This will now add the same condition to the closing tag as the opening tag (when comments are on), and hence won’t add an extra closing tag.

    I hope this helps someone else out as it took me an hour or so to figure it out. Feel free to comment or email me so you can get my PayPal address and send me a “thank you” donation – hehe.

    Hit me up on my Web Audio Marketing, Royalty-Free Music Licensing or Custom Web Design & Hosting sites if you need any help.

    Cheers,

    -Mark

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘problem with egecia template’ is closed to new replies.