Notifications
Clear all
Topic starter
28/03/2018 5:49 pm
Hello. So first of all very much respect for this great plugin. But now I have a question. I have an AdvertsPlugin where I embed comments with this code. Is there also the possibility to include your comments there?
<?php add_action("adverts_post_type", "enable_adverts_comments"); add_action("adverts_insert_post", "enable_adverts_comments_check"); add_action("adverts_update_post", "enable_adverts_comments_check"); /** * @see register_post_type() * @link https://codex.wordpress.org/Function_Reference/register_post_type * @param array $args Custom Post Type init params * @return array
*/ function enable_adverts_comments( $args ) { $args["supports"][] = "comments"; return $args; } /** * @param array $data * @return array Updated $data */ function enable_adverts_comments_check( $data ) { $data["comment_status"] = "open"; return $data; }
Topic starter
28/03/2018 7:54 pm
nobody an idea? :(
28/03/2018 10:12 pm
I'm sorry, but we are not familiar with this Plugin. wpDiscuz doesn't create any comments (all comments are WordPress comments). Since wpDiscuz is a WordPress native comment system, it should work with the plugin, which you mentioned. So you can get the comments and display it where you need.
Topic starter
29/03/2018 12:39 pm
Yes, yes, with the above code I call the Wordpress comments.
It is not an extra comment system.
I would just like to know how to integrate it with your plugin. What is the code for your plugin?
30/03/2018 1:59 pm
Hi @4vapors,
Could you please navigate to Dashboard > Comments > Forms, edit the Default Form and set it for all custom post types, then save and delete all caches.