Notifications
Clear all

Calling wpDiscuz with custom shortcode...

2 Posts
2 Users
0 Likes
3,421 Views
(@wtwebmaster)
New Member
Joined: 6 years ago
Posts: 1
Topic starter  

Hi,

We need to place the Comment block within the Page content.

To do this, I've put together the following shortcode and it works fine, except I'd prefer to be calling wpDiscuz instead of WP's default comment system:

add_shortcode( 'my_comment_form', function( $atts = array(), $content = '' ) {
if( post_type_supports( get_post_type(), 'comments' ) ) {
  ob_start();
  comment_form();
  print( '<style>.no-comments { display: none; }</style>' );
   add_filter( 'comments_open', '__return_false' );
}
return '';
}, 10, 2 );

Essentially, I'd like to replace  comment_form();  from above with a call to wpDiscuz.

 

Thanks!

 


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5935
 

Hi wtwebmaster,

wpDiscuz doesn't have shortcode. 

wpDiscuz is designed as a native WordPress comment system. I'm sorry but you can't add it in page content, it's loaded under page content. 


   
ReplyQuote
Share:
Scroll to top