• Resolved lieutenantdan

    (@lieutenantdan)


    I am currently in the midst of converting a HTML template into a WordPress theme, I’ve solved most of my problems using the Codex or other threads, but I just can’t seem to figure out how to have threaded comments go under the comment they should, anybody?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Log-in to the wordpress Admin Area.

    Navigate to Settings > Discussion. Make sure enable threaded nested comments is enabled.

    Thats all.

    Thread Starter lieutenantdan

    (@lieutenantdan)

    I dont think you really understand….

    I am making my own wordpress theme, custom comments, not the default theme comments….

    I need to know how to nest the comments using PHP

    Use this on the template page where you want comments to appear.

    <?php comments_template(); // Get wp-comments.php template ?>

    no need for any other php. WordPress automatically puts comments in lists, and will display them as nested if the option is selected. Than just style them with css.

    can’t seem to figure out how to have threaded comments go under the comment they should

    does this mean:

    – you have the ‘comments_template()’ code in single.php and page.php;
    – you have a comments.php in your theme;
    – and this comments.php is using ‘wp_list_comments()’ ?

    https://codex.www.ads-software.com/Function_Reference/wp_list_comments

    Thread Starter lieutenantdan

    (@lieutenantdan)

    @gnarlyinc
    Why cant I do it my own way, WordPress cant do it why can’t anyone else…

    @alchymyth
    I’ve got a comments_template(), with my own custom comments to be listed, I just need to know how to make the comments go in the right place, nobody seems to know though

    I’ve got a comments_template(), with my own custom comments to be listed

    do you have a comments.php in your theme?

    if so, paste the full code of comments.php into a pastebin and post the link to it here – see https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    I just need to know how to make the comments go in the right place

    without being able to see how it looks right now, nobody can possibly know. please post a link to your site.

    coming back to your earlier remark:

    I need to know how to nest the comments using PHP

    that is done by using ‘wp_list_comments()’

    Why cant I do it my own way, WordPress cant do it why can’t anyone else…

    You can do it your way, I`m just giving you the easiest way. WordPress can and will list comments, try being a bit mroe clear on what you want to do.

    I’ve got a comments_template(), with my own custom comments to be listed, I just need to know how to make the comments go in the right place, nobody seems to know though

    comments should be in a list, than the list can be styled with css like any other list, ie set margins, padding, list-style-type, etc. until you get the look you want.

    Thread Starter lieutenantdan

    (@lieutenantdan)

    I ended up using my own function for the comment style, it’s located in the codex here in case anyone else needs the solution. Thanks to all who took time out of their lives to help poor old me.

    https://codex.www.ads-software.com/Function_Reference/wp_list_comments#Comments_Only_With_A_Custom_Comment_Display

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add threaded/nested comments’ is closed to new replies.