The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] Merge comments posts with woocommerce products
✦ Summarize Topic
✦
✦
✦
AI is analyzing the discussion...
How-to and Troubleshooting
(@tvrate)
Posts: 2
New Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
[#2131]
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.
Posted : 07/06/2021 5:22 pm
(@asti)
Posts: 8281
Illustrious Member Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
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.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
Posted : 08/06/2021 1:48 pm
(@tvrate)
Posts: 2
New Member
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti Thanks! Working perfectly!
Posted : 08/06/2021 2:50 pm
Super Globals
Options and Features