The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] link to the BuddyPress profile
✦ 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...
Jun 07, 2022 11:48 am
(@tazar)
Active Member
Joined: 4 years ago
Hi
I'm using the BuddyPress integration addon. I have 'Link "My Content and Settings" Button to Profile Discussions Tab.' enabled.
I want when someone clicks on a comment author name to be redirected to their BuddyPress profile. Now, it just opens up the WPDiscuzz popup.
What settings do I need to do for what I said above?
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...
Jun 07, 2022 12:26 pm
(@asti)
Illustrious Member
Joined: 8 years ago
Hi tazar,
You should use the wpdiscuz_user_settings_button hook for the customization.
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...
Jun 07, 2022 1:51 pm
(@tazar)
Active Member
Joined: 4 years ago
Could you please give me an example of how I can use that function? I can only copy&paste code, but don't know WordPress programming 🙁
I also thought that clicking on someone's name should have redirect automatically to their BuddyPress profile instead of the default WPDiscuzz popup window. Or that is not so?
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8210
Jun 09, 2022 2:43 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...
@tazar,
This code should work fine:
if (!function_exists('custom_url')) {
add_filter("wpdiscuz_user_settings_button", "custom_url", 10, 3);
function custom_url($html, $currentUser, $currentUserEmail) {
if (!empty($currentUser->ID)) {
$user_url = function_exists('bp_core_get_user_domain') ? bp_core_get_user_domain($currentUser->ID) : '';
if ($user_url) {
$wpdiscuz = wpDiscuz();
$html = "<div class='wpdiscuz-user-settings wpd-not-clicked' wpd-tooltip='" . esc_attr($wpdiscuz->options->getPhrase("wc_content_and_settings")) . "' wpd-tooltip-position='right'><a href='$user_url'><i class='fas fa-user-cog'></i></a></div>";
}
}
return $html;
}
}
Put it in the active theme functions.php file.
This article helps to add a custom code to your website: 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...
Jun 09, 2022 4:36 pm
(@tazar)
Active Member
Joined: 4 years ago
Thank you very much. That works! For sure, I could not write this code snippet myself :))
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8210
Jun 09, 2022 4:41 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...
@tazar,
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.