• Hi.

    Does anyone know how I can place the commentform and the latest comment in the indexfile under each post?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    You need to make a custom function based on comments_template() that allows it to respond to calls from your index page, and only returns the latest comment (by altering the existing database query). It will still display the form. It also needs to accept a parameter for the post ID#.

    Then inside the loop, use get_the_ID() and pass the result to your function. I’m not 100% sure this will work correctly, so do a proof of concept test before spending a lot of time on this.

    Thread Starter Sinopa

    (@sinopa)

    Eh… ok???

    That made me feel kinda dumb 😀

    Moderator bcworkz

    (@bcworkz)

    Or maybe you have a real life so are not familiar with the inner workings of WP 🙂 The comment display function is specifically written to not work on the index page. Perhaps your idea is not really meant for your blog, unless you can find a theme that does this for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comment form in index under post’ is closed to new replies.