The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Distinguish between...
 
Share:
Notifications
Clear all

[Solved] Distinguish between comments on pages differing only by query strng parameter

7 Posts
2 Users
0 Reactions
1,211 Views
Posts: 4
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
(@timbergski)
Active Member
Joined: 4 years ago
[#3770]

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.


6 Replies
Asti
Posts: 8210
 Asti
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
(@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.


5 Replies
(@timbergski)
Joined: 4 years ago

Active Member
Posts: 4
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

@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
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

@asti Hello, is there a solution to my problem or would I have to create a post/page per product?


Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8210
Asti
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

@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
Asti
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

@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
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8210
Asti
Asti
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

@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.


Share: