The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to add specific post comments on specific page?
How-to and Troubleshooting
(@hnpsk)
New Member
Joined: 5 years ago
Hi there,
I'm using this code and showing the wpdiscuz form with the shortcode and everything is working fine. The only issue is it's showing the current post comments. Can you please let me know how can I show the specific post comments on any page?
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");
(@hnpsk)
New Member
Joined: 5 years ago
Hi Tom,
Thanks for your quick reply.
My comment form and comments everything is working fine and it's displaying the comments of the current page with this shortcode [wpdiscuz_comments].
I just wanted to show the comments of a specific post. For example please see the shortcode below.
[wpdiscuz_comments post_id="22"]
Where "post_id" parameter fetching the comments of only post id 22. How can I do this with the wpdiscuz plugin? So I can fetch the comments of a specific post. Can you please help me with this?
Thanks!
(@josh)
Active Member
Joined: 2 years ago
I've also been interested in accessing the comment form for a specific post. I have full control of a galleries output and can pass ID's to it including do_shortcode but need a way for the shortcode to read a specific ID. This would be perfect:
[wpdiscuz_comments post_id="22"]