Site logo

Archived topic

CPT not showing comment form?

1 reply · Started by Klaas Koopman on May 21, 2021

Viewing posts 1–2 of 2

Hi all,

I'm been working on my first Generatepress website, where I want to do more then just the basics. Right now I'm working on a CPT, but somehow it doesn't show the comment form on the posts itself.

Where do I find the code in Generatepress themefiles that is putting the form there? I've worked with many themes and usually it was easy to find and place/replace/remove. But with Generatepress I have the feeling everything is all over the place.

Would love to hear from you!

Hi there,

simply put there are two main parts of creating a CPT.
First is the registration of the CPT. Part of which includes the post_type_supports function - which includes comments - see here:

https://developer.wordpress.org/reference/functions/post_type_supports/

The second part is the templates - which is what the Theme is responsible for. If building a CPT from scratch and you want to use GP functionality then you should create your templates from the theme templates - see here:

https://docs.generatepress.com/article/setting-up-a-simple-custom-post-type/

This archived topic is closed to new replies.