The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] Distinguish between comments on pages differing only by query strng parameter
✦ Summarize Topic
✦
✦
✦
AI is analyzing the discussion...
How-to and Troubleshooting
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...
Mar 04, 2022 2:51 pm
(@timbergski)
Active Member
Joined: 4 years ago
Hello,
I'm building a site which has a "/product" page. I distinguish between the pages for different products via a query string parameter e.g. /product?id=<the product id>.
I need there to be separate comments for each product. However, any comments get shared between all the different products by default - as comments on the /product page.
Is there a way to fix this, without creating a separate WP page for each product?
Many thanks.
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...
Mar 04, 2022 5:12 pm
(@asti)
Illustrious Member
Joined: 8 years ago
Hi,
wpDiscuz works fine with default permalinks:
wpdiscuz.com/?p=1
Also, wpDiscuz works if the global $post exists. Please check and make sure everything is correct with the global $post.
(@timbergski)
Joined: 4 years ago
Active Member
Posts: 4
Mar 04, 2022 6:34 pm
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 but it's a page and the product-id parameter is interpreted by custom code in the special template for that page. WP knows nothing of this. I can't create (many) posts or pages as the solution to my problem.
(@timbergski)
Joined: 4 years ago
Active Member
Posts: 4
Mar 08, 2022 12:57 pm
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 Hello, is there a solution to my problem or would I have to create a post/page per product?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8210
Mar 09, 2022 2:07 pm
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...
@timbergski,
We're really sorry, but we can't help you with this issue. wpDiscuz is highly dependent on the global $post object.
As far as we understand you're trying to load several products on one page.
(@timbergski)
Joined: 4 years ago
Active Member
Posts: 4
Mar 09, 2022 8:49 pm
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. Is there any way of temporarily overriding $post - in particular, appending the product-related query parameter to the guid - to trick your software into creating separate comment streams for separate products?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8210
Mar 11, 2022 12:00 pm
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...
@timbergski,
In the wpDiscuz js files, depending on the post, it sends the information about the current post via the localize. In your case, if the posts are not loaded with a refresh it won't work.
If the posts load with a refresh it may work.