Hi,
I use careerfy theme, in this theme, there is a custom post page (job) for each user
On this page, I want to display comments
I have added a custom hook, and then call it from the page file.
Â
shortcode in function.php
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");
Â
inside the file I have added:
echo do_shortcode("[wpdiscuz_comments]");
Â
but unfortunately, I get this
I have enabled comments from WordPress setting, comments work fine on posts
Â
help please
Hi,
Now you'll need to edit the comment form and enable it for the current type. More info here: https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-settings/#post-types
unfortunately, it didn't work.