The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Question Widget/Shortcode for showing user's most recent 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...
Jul 25, 2026 2:42 am
(@daniellerch)
Active Member
Joined: 1 year ago
We are building a website that will be running wpDiscuz, wpForo, and LearnDash LMS -- so, we want users to have a single User Dashboard page where we can show them their own most recent activity from all three plugins. Is there a way to do this for wpDiscuz activity show via a shortcode or widget?
(@wpdiscuz-support)
Joined: 10 months ago
Member
Posts: 7
Jul 27, 2026 2:02 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...
Hi @daniellerch,
Great question! For wpDiscuz specifically, you're in luck — the plugin includes a Recent Comments widget that you can use to display a user's recent comments. However, since you're looking to aggregate activity from multiple plugins (wpDiscuz, wpForo, and LearnDash) on a single dashboard, you'll likely need a more comprehensive approach.
Here are a few strategies to consider:
- Use wpDiscuz's Recent Comments Widget: This is the built-in solution for wpDiscuz activity, and it can be placed in a widget area on your dashboard page.
- Create a custom dashboard page: You might want to explore using a page builder (like Elementor or Beaver Builder) combined with custom code to query user activity from all three plugins and display it in one unified view.
- Check for dashboard plugins: There are some user dashboard plugins that work with multiple activity sources — you could look into whether any support all three of your plugins.
- Custom shortcode development: If you have development resources, creating a custom shortcode that queries user activity across all three plugins would give you the most control and flexibility.
Have you already explored the wpDiscuz widget options, or are you specifically looking for a way to combine all three plugin activities into a single shortcode? That would help me point you toward the best solution for your setup.
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...
Jul 28, 2026 2:19 am
(@daniellerch)
Active Member
Joined: 1 year ago
Thanks! I actually did try using the Recent Comments tab in the wpDiscuz Widget that I see in Appearance > Widgets, but that seems to show *all* recent comments, whereas what I want is to show only the comments by the logged in user. Are you referring to a different widget?
(FWIW the theme is GeneratePress.)
(@asti)
Joined: 9 years ago
Illustrious Member
Posts: 8345
Jul 29, 2026 1:32 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...
@daniellerch
Please try using the following hook code. Insert it into the active theme's functions.php file:
const WPD_RUO_CACHE_DOMAIN = "wpd_registered_only";
function wpd_ruo_tag_recent_comments_args( $args ) {
$args["cache_domain"] = WPD_RUO_CACHE_DOMAIN;
return $args;
}
add_filter( "wpdiscuz_widget_recent_comments_args", "wpd_ruo_tag_recent_comments_args" );
function wpd_ruo_filter_comment_clauses( $clauses, $query ) {
if ( WPD_RUO_CACHE_DOMAIN !== ( $query->query_vars["cache_domain"] ?? "" ) ) {
return $clauses;
}
global $wpdb;
$clauses["where"] .= " AND {$wpdb->comments}.user_id > 0";
return $clauses;
}
add_filter( "comments_clauses", "wpd_ruo_filter_comment_clauses", 10, 2 );
Instructions for adding custom code to WordPress:
https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/
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...
Jul 29, 2026 10:25 pm
(@daniellerch)
Active Member
Joined: 1 year ago
Thanks; I just did that, cleared caches and reloaded -- but it does not seem to have made a difference. Was the intended purposes of this code to force the existing widget's "Recent Comments" tab to display only the current user's comments, or something else?
Super Globals
Options and Features