The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Merge comments post...
 
Share:
Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!

Merry Christmas and Happy Holidays! 🎄

[Solved] Merge comments posts with woocommerce products

3 Posts
2 Users
1 Reactions
1,245 Views
Posts: 2
Topic starter
(@tvrate)
New Member
Joined: 5 years ago

I've already addressed the solution. https://wordpress.org/support/topic/merge-comment-form/

The comments thread displayed correct(сombined) on Post and woocommerce product. but when you add a comment on the product page, it is not added to the post comments, it is still added to the product comment. How do I make it so that when you add a comment on a product page, it is added to the comments of the post?

I checked with the standard comment system form, it works correctly.


2 Replies
Asti
Posts: 8202
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

Hi @tvrate,

Please replace the following code you've added:

<?php add_action('wp_enqueue_scripts', 'woo_comments', 5); ?>

with the following one: 

add_action('wp_enqueue_scripts', function () {
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();
}
}
}, 9);
add_action('wp_enqueue_scripts', function () {
wp_reset_postdata();
}, 11);

It should work fine. 


1 Reply
(@tvrate)
Joined: 5 years ago

New Member
Posts: 2

@asti Thanks! Working perfectly!


Share: