Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling and display of comment replies #3

Open
JeffMatsonPagely opened this issue Aug 15, 2019 · 1 comment
Open

Handling and display of comment replies #3

JeffMatsonPagely opened this issue Aug 15, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@JeffMatsonPagely
Copy link
Contributor

Right now, comment replies aren't a functional feature. This should be implemented to better reflect the theme it's based on (and core WordPress functionality).

@JeffMatsonPagely JeffMatsonPagely added the enhancement New feature or request label Aug 15, 2019
@scottopolis
Copy link

scottopolis commented Aug 18, 2019

I just added this to my theme, it's still a little rough but here's the gist (in case it's helpful).

Add replies to the graphql query:

query($postId: ID!) {
comments(where: { contentId: $postId }) {
  nodes {
    ...CommentFields
    children {
      nodes {
        ...CommentFields
      }
    }
  }
}
}

Then inside the comment loop you look for replies and loop through those too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants