I have written a plugin that creates it’s own tables to house the necessary schema for client’s product. Then I created a single page that retrieves the custom object via passed in query string like so:
http://localhost/wordpress/my_object/?id=7
Where it would retrieve the item with ID 7 in it’s custom table.
However the client would like to have commenting enabled on their custom object’s page, with those comments obviously being related to the item with id 7.
Seeings how I don’t create a page, or post for this object. Is there any way to tie WordPress Built In Commenting to this custom object ?
I would enable comments for that page and save them with a comment meta holding your object’s ID. To be more specific, this is how would I tackle this issue:
comment_post
action and save a comment meta calledmy_object_id
with your custom object ID as a value when posting a comment from the relevant page.meta_key => "my_object_id"
andmeta_value
set to the actual object ID you’re retrieving the comments for.