Support Forum
Support › MB Custom Table › Commenting System - Custom Table Approach
Hi
I have come across this guide PHP MySQL Commenting System and I am trying to think of the best approach to re-building this into a custom table using Meta Box. The front end commenting system in this guide just creates threaded comments when viewing a specific post id and allows you to reply to comments. then stores the post id to retrieve them later and orders them by date. I do not want to use the default WordPress commenting system as custom fields is not supported in the front end.
Ideas:
Any pointers of alternative approaches would be greatly appreciated.
Also a side note on this topic is that if WordPresss core supported custom comment types (like how post types work) then I guess it would possibly help with developing a solution with metabox https://github.com/sc0ttkclark/wp-custom-comment-types
Thanks
Nick
Hi Nicholas,
Instead of doing a lot of works to create a comment system, add the custom fields for comments on the frontend. I think you can follow this topic to add some fields to comments on the frontend and save them to the wp_commentmeta
table of WordPress.
https://wordpress.org/support/topic/add-a-new-field-to-comment-form/
Hi
Thanks for this but as I am going to store 3 additional fields into the 'wp_commentmeta' table this will not work for me, as my metadata will be stored in multiple rows instead of single rows. I am going to have alot of comments per post I can see this database size bloating pretty quick. I have a feeling there is not going to be a clean solution for my problem other than spending the time to build a bespoke commenting system so I can optimise front end performance.
Thanks
Nick