Notifications
Clear all

Add Comments

5 Posts
2 Users
0 Reactions
1,723 Views
(@4vapors)
New Member
Joined: 7 years ago
Posts: 3
Topic starter  

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; }

   
Quote
(@4vapors)
New Member
Joined: 7 years ago
Posts: 3
Topic starter  
nobody an idea? :(

   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 
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.

   
ReplyQuote
(@4vapors)
New Member
Joined: 7 years ago
Posts: 3
Topic starter  
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?

   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

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. 


   
ReplyQuote
Share:
Scroll to top