Hello! there is a "reviews" page, there are wpDiscuz comments .. how to duplicate these wpDiscuz comments on the main page for example ...
Hi @face2005,
wpDiscuz doesn't have such a feature, However, I've contacted plugin developers they provide a solution for you. Please follow the steps below:
1. Put the codes in the functions.php file of the active theme:
Â
add_filter("wpdiscuz_js_options", function ($optionsJs){
if (is_front_page()) {
$optionsJs["wc_post_id"] = X;
}
return $optionsJs;
});
add_filter("is_load_wpdiscuz", function ($load){
if (is_front_page()) {
$load = true;
}
return $load;
})
Â
2. This code should be added in the page content where you'd like to add duplicated comments:Â
if (is_front_page()) {
$oldId = get_the_ID();
$post = get_post(X);
comments_template();
$post = get_post($oldId);
} else {
comments_template();
}
Please change the value of the red marked code. You should use the page_Id whose comments should be loaded on the current page instead of the X.Â
We cannot guarantee that this will work in 100% as far as this is just a quick solution and Product Modifications and Customization is not included in our Support.Â
Â
Hello! Cool! Everything works, thank you!