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
(@tazar)
Posts: 4
Active Member
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...
[#4257]
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?
Posted : 07/06/2022 11:48 am
(@asti)
Posts: 8257
Illustrious Member 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...
Hi tazar,
You should use the wpdiscuz_user_settings_button hook for the customization.
In case you want to say thank you! 🙂
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.
Posted : 07/06/2022 12:26 pm
(@tazar)
Posts: 4
Active Member
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...
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?
Posted : 07/06/2022 1:51 pm
(@asti)
Posts: 8257
Illustrious Member 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...
@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)
In case you want to say thank you! 🙂
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.
Posted : 09/06/2022 2:43 pm
(@tazar)
Posts: 4
Active Member
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...
Thank you very much. That works! For sure, I could not write this code snippet myself :))
Posted : 09/06/2022 4:36 pm
(@asti)
Posts: 8257
Illustrious Member 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...
@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.
In case you want to say thank you! 🙂
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.
Posted : 09/06/2022 4:41 pm
Super Globals
Options and Features