Sep 16, 2020 9:31 am
Hi,
I'm using the free version for Brizy.
My plugins are all updated to the latest versions.
- I completed the setup for wpdiscuz
- Then I added the shortcode to the page where I want the plugin to be.
- I also 'turned on" the comments for the page where I added the plugin,
Still, can't see the plugin, instead I see the text for the shortcode, see here
I used another short-code for a different plugin, and it worked, but not for Wpdiscuz.
Let me know what went wrong and how can this be fixed.
1 Reply
Sep 16, 2020 11:21 am
Hi @sushant,
Please put the code in the current 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");
Then put the shortcode in post content:
[wpdiscuz_comments]
If you need to use shortcode in theme files add it with do_shortcode function:
<?php
echo do_shortcode("[wpdiscuz_comments]");
?>