Notifications
Clear all
Topic starter
21/08/2018 6:03 pm
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!
22/08/2018 1:39 pm
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.