• swollenpickles

    (@swollenpickles)


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

    The whiteboard theme:
    https://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]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter swollenpickles

    (@swollenpickles)

    Well, here’s the code:
    https://wordpress.pastebin.ca/1832644

    esmi

    (@esmi)

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

    Thread Starter swollenpickles

    (@swollenpickles)

    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?

    esmi

    (@esmi)

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

    Thread Starter swollenpickles

    (@swollenpickles)

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

    esmi

    (@esmi)

    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.

    Thread Starter swollenpickles

    (@swollenpickles)

    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.

    esmi

    (@esmi)

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

    Thread Starter swollenpickles

    (@swollenpickles)

    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.

    Thread Starter swollenpickles

    (@swollenpickles)

    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:
    https://wordpress.pastebin.ca/1834959

    esmi

    (@esmi)

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

    Thread Starter swollenpickles

    (@swollenpickles)

    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:
    https://wordpress.pastebin.ca/1834959

    Thread Starter swollenpickles

    (@swollenpickles)

    I’ve now uploaded the theme and you can see it working here:
    https://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?

    esmi

    (@esmi)

    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;
    }
    Thread Starter swollenpickles

    (@swollenpickles)

    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?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Threaded comments not threading’ is closed to new replies.