Hi Artyom,
The global object (before the comments_template() function) of the product and post should be the same. In this case the comments will be merged.
Thread Starter
Artyom
(@ryabchuk)
Hey! Its almost working.
I added comment form from the post but when I adding new comment from product page to this form, comment not adding to post ID. Comment still adding to product page (but I got rid of woo-tab). Hope I clear explain. Maybe need to disable comment form on product page? But when I uncheck product in the wpDiscuz form or in the Woocommerce->product->review form not displaying.
function woo_comments(){
global $obzor_id;
$args = array(
'p' => $obzor_id // ID
);
$qry = new WP_Query($args);
if ($qry->have_posts()) {
while ($qry->have_posts()) {
$qry->the_post();
comments_template();
}
}
wp_reset_postdata();
}
-
This reply was modified 5 years ago by
Artyom.
Please try to call the same function before the wp_enqueue_scripts() hook.
Thread Starter
Artyom
(@ryabchuk)
Thread Starter
Artyom
(@ryabchuk)
Standard wp comments form working right, but with redirect after submit button (without ajax)