The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Question [Solved] Conditionally displaying comments
✦ 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...
May 18, 2023 10:24 pm
(@solodevelops)
Active Member
Joined: 3 years ago
Currently on my website I have comments enabled to load on my "wall pages", which are essentially posts. Each wall page is saved as an entry to a unique database and each entry has a unique ID ("id" column). The comments are all saved in the default wp_comments table and I've added a "wall_post_id" column to them, so that the column updates with the value of the id of the wall page for each comment entry.
I want to only display comments that have matching "wall_post_id" with the id of the current "wall page". I don't know which file to manipulate in the file manager.
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...
May 19, 2023 9:11 am
(@asti)
Illustrious Member
Joined: 8 years ago
Hi Solodevelops,
As you may know, wpDiscuz is a native comment system and it uses the same WordPress database tables to store the comments. So this is not a wpDiscuz-related question.
You should use the pre_get_comments hook to make it work as you need. More info here: https://developer.wordpress.org/reference/hooks/pre_get_comments/
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...
May 22, 2023 3:24 pm
(@solodevelops)
Active Member
Joined: 3 years ago
Hey Asti,
Thanks for getting back to me. I'll look into using the pre_get_comments hook.
Looking at the files within the "wpdiscuz" folder, in plugins, I see one or two files with comment retrieving functionality. If I was to insert the pre_get_comments logic somewhere, I assume it would be outside of the wpdiscuz folder, perhaps in my functions.php?
Thanks
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8205
May 23, 2023 8:08 am
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...
@solodevelops,
Yes sure, you should add the code in the active theme functions.php file.
(@solodevelops)
Joined: 3 years ago
Active Member
Posts: 4
May 25, 2023 10:11 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 hey Asti, could I get more support on this please. How would I use `pre_get_comments` to perform a custom filter on the comments before they're loaded using WpDiscuz? At the moment it's just loaded every comment created on every wall page
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8205
May 26, 2023 10:00 am
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...
(@solodevelops)
Joined: 3 years ago
Active Member
Posts: 4
Jun 07, 2023 11:35 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 Hey Asti!
It's me again. I am going through my file manager and was wondering if you could tell me which file from the WpDiscuz plugin is responsible for displaying the comments via using the WP native comment retrieval mechanism?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8205
Jun 10, 2023 7:20 am
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...
@solodevelops,
The file is called comment-form.php.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8205
Jun 27, 2023 8:03 am
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...
We have not received a reply from you for over a couple of weeks, therefore we will be closing this topic. Please create a new one if you require any additional help.
Thank You!