Skip Navigation

[Resolved] Creating Post Type for comments

This thread is resolved. Here is a description of the problem and solution.

Problem:

Hi, I would like to create a Post Type for Comments so that

1) comments can be left by visitors after they are redirected to the comments page;

2) and that the comments which they had left for a specific product are displayed below on the product page of this product (I mean finally within the Post Type for this product and not where the comments themselves were left and stored)

Solution:

You can create a custom post type, for example "My comment CPT", setup one to many relationship between post type "Product" and "My comment CPT"

https://toolset.com/documentation/post-relationships/

Then setup a CRED form for user to create "My comment CPT" post:

https://toolset.com/documentation/user-guides/creating-cred-forms/

In single "Prodcut" post, display a view, list related "My comment CPT" posts.

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

Relevant Documentation:

https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#909297

Hi, I would like to create a Post Type for Comments so that
1) comments can be left by visitors after they are redirected to the comments page;
2) and that the comments which they had left for a specific product are displayed below on the product page of this product (I mean finally within the Post Type for this product and not where the comments themselves were left and stored)
Thanks.

#909639
One-to-many.JPG

Hello,

You can create a custom post type, for example "My comment CPT", setup one to many relationship between post type "Product" and "My comment CPT"
https://toolset.com/documentation/post-relationships/

Then setup a CRED form for user to create "My comment CPT" post:
https://toolset.com/documentation/user-guides/creating-cred-forms/

In single "Prodcut" post, display a view, list related "My comment CPT" posts.
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

#911565

Thanks

#911614

You are welcome