Forums

Threaded comments not threading (17 posts)

  1. swollenpickles
    Member
    Posted 2 years ago #

    I'm trying to create a custom wordpress theme. I started out using Whiteboard theme as the base.

    The whiteboard theme:
    http://plainbeta.com/2008/05/20/whiteboard-a-free-wordpress-theme-framework/

    I've gotten to the stage where I'm almost finished and I'm testing it. I just tried to use the threaded comments (after enabling it under Discussion Settings) but when I go to a post and hit 'reply' it is not nesting the comment as I would have expected. Instead it just adds the comment to the end of the comments list. Any ideas on what I may be doing wrong? I've attached the comments.php code below in case that helps.

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. swollenpickles
    Member
    Posted 2 years ago #

    Well, here's the code:
    http://wordpress.pastebin.ca/1832644

  3. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try just using <?php wp_list_comments(); ?>

  4. swollenpickles
    Member
    Posted 2 years ago #

    If you take a squizz at the code I've used <?php wp_list_comments('avatar_size=60'); ?> which i believe does the same thing as <?php wp_list_comments(); ?> except also adjusts the avatar size. Any other advice?

  5. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Yes - take out 'avatar_size=60' for now.

  6. swollenpickles
    Member
    Posted 2 years ago #

    I removed 'avatar_size=60' but the comments still aren't threading.

  7. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Fair enough. Just wanted to ensure that you hadn't just hit a bug that I wasn't aware of. Try checking your theme's header.php file and ensure it contains:

    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>

    just before the </head> tag.

  8. swollenpickles
    Member
    Posted 2 years ago #

    Thanks, that section was missing. I've added it now. The problem now is that when I hit the 'reply' link, it opens up the comment field, but I can't type any text into the text field. Very weird.

  9. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Could be a plugin. Or, just as likely, a CSS issue.

  10. swollenpickles
    Member
    Posted 2 years ago #

    If I leave a new comment the text field works fine, I can enter text, submit the comment and it all works as it should. If I try and leave a reply to a comment however I can enter the name, email, website but cannot even type in the text field.

  11. swollenpickles
    Member
    Posted 2 years ago #

    The inability to type was a plugin issue by the looks of things. I disabled MCEComments and now can type and submit 'reply' comments.

    The replys still aren't threading though, I'm guessing from here on it's a css thing, but can't be sure. I've attached the css to the bottom of the code here:
    http://wordpress.pastebin.ca/1834959

  12. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    A link to your site would be far more useful for troubleshooting a CSS problem.

  13. swollenpickles
    Member
    Posted 2 years ago #

    I'm working on the theme on a local environment so it's not live online anywhere (ie. it's not a live site).

    I've added the css code for the comments section to here:
    http://wordpress.pastebin.ca/1834959

  14. swollenpickles
    Member
    Posted 2 years ago #

    I've now uploaded the theme and you can see it working here:
    http://www.swollenpickles.com/2010/03/17/a-new-theme-and-the-bug-hunt-begins/comment-page-1/#comment-53467

    That comment is a direct reply to the comment above it. It's a css issue as far as I can tell, but I'm not sure what I've screwed up.

    A standard comment (ie. not a reply to existing comment) should be left aligned with the rest of the pages content, but currently it seems to be pushed about 20px to the right as well.

    Any advice?

  15. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    On that page, the second comment is in reply to the first - hence the CSS nested display. If you mean that the whole comment list is being pushed over, it's because your comment list CSS is being over-ridden by:

    .post ol {
    padding:10px 0 10px 30px;
    }

    Try changing:

    ol.commentlist {
    padding:10px 0;
    }

    to:

    .post ol.commentlist {
    padding:10px 0;
    }
  16. swollenpickles
    Member
    Posted 2 years ago #

    Thanks, that fixed the issue of all comments being pushed to the right.

    Now to edit the style of the nested comment, should I be playing around with ul.children in the css?

  17. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Yes. Try something like:

    .commentlist .children li {
    	margin:10px 20px;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic