Building with Astro x Wordpress - feat Jeff Everhart!
Вставка
- Опубліковано 25 жов 2022
- Wordpress is the cornerstone to content-based sites. Let's see how we can query your content with WPEngine + GraphQL and bring it to an Astro site! -- Watch live at / bholmesdev
- Ігри
Great stuff!
Does anybody know of any content online that covers getting draft previews to work with Astro / Wordpress?
At around the hour mark, it starts getting really confusing, lol
How do you handle the comments section of a Wordpress post? I.e. authentication, posting of new comments, etc.
I did it with a wpgraphql mutation, below, with a vue component. Then it's a simple post. Any comments created follow the same rules as regular comments.
mutation CREATE_COMMENT($postId:Int,$content:String,$author:String,$authorEmail:String) {
createComment(input: {
commentOn: $postId,
content: $content,
author: $author,
authorEmail: $authorEmail
}) {
success
comment {
id
content
author {
node {
name
}
}
}
}
}