wpDiscuz - WordPress Comment Plugin
Share:
Notifications
Clear all

Comment Section  


Nick7961
Posts: 6
(@nick7961)
Active Member
Joined: 2 weeks ago

how to use comment section in post by shortcode?

789

 

11 Replies
Asti
Posts: 1270
 Asti
Support
(@asti)
Support member
Joined: 3 years ago

Hi @nick7961,

Have you put the code provided by Taron in this post in the active theme functions.php file? 

 

Reply
10 Replies
Nick7961
(@nick7961)
Joined: 2 weeks ago

Active Member
Posts: 6

Hi @asti

No, i haven't... what's the code? and how to add that? 

Reply
Asti
 Asti
Support
(@asti)
Joined: 3 years ago

Support member
Posts: 1270

@nick7961,

Put this code in the active theme functions.php file:

function my_wpdiscuz_shortcode() {
$html = "";
if (file_exists(ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php")) {
ob_start();
include_once ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php";
$html = ob_get_clean();
}
return $html;
}
add_shortcode("wpdiscuz_comments", "my_wpdiscuz_shortcode");

More information on how to add insert custom code: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Reply
Nick7961
(@nick7961)
Joined: 2 weeks ago

Active Member
Posts: 6

@asti I add this code in code snippet plugin. I'm using a custom page made by elementor but the comment section shows only in the elementor edit section. When I preview this post then nothing is there.

4444
Reply
Asti
 Asti
Support
(@asti)
Joined: 3 years ago

Support member
Posts: 1270

@nick7961,

Please leave some example URL to allow us to check the issue. 

Reply
Nick7961
(@nick7961)
Joined: 2 weeks ago

Active Member
Posts: 6
Asti
 Asti
Support
(@asti)
Joined: 3 years ago

Support member
Posts: 1270

@nick7961,

We don't see a comment section in the link you've provided. 

Reply
Nick7961
(@nick7961)
Joined: 2 weeks ago

Active Member
Posts: 6

@asti that's what I said... there is no comment section there... but when I'm editing the post with elementor it appears in the editing section. And when I preview it then nothing is there...

Reply
Asti
 Asti
Support
(@asti)
Joined: 3 years ago

Support member
Posts: 1270

@nick7961,

Please send the admin login details to info[at]gvectors.com email address. I'll ask the developers to check the issue for you. 

Reply
Nick7961
(@nick7961)
Joined: 2 weeks ago

Active Member
Posts: 6

@asti can you do that live? so that in future, i can resolve my issue by myself.

Reply
Asti
 Asti
Support
(@asti)
Joined: 3 years ago

Support member
Posts: 1270

@nick7961,

At first, we'll need to understand the reason for the issue. Then we'll be able to provide some solution for you. 

Reply
Share: