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
feature error: Use ...
 
Notifications
Clear all

[Solved] feature error: Use Website URL as Profile URL

11 Posts
3 Users
2 Reactions
2,108 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
(@tienthangtn)
Active Member
Joined: 4 years ago
[#3285]

I can't use your "Use Website URL as Profile URL" feature. It only shows the author's article detail page. I have updated the link in the profile page. I have tried the 2 supported code snippets in the 2 articles:

https://wpdiscuz.com/docs/codex/filters/wpdiscuz_profile_url/

and https://wpdiscuz.com/community/troubleshooting/profile-url-not-working-for-all-users/#post-5592

It still can't work.

Please help me


10 Replies
Asti
Posts: 8211
 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 tienthangtn,

The option "Use Website URL as Profile URL" works only if you fill the URL in the "Website" field. 

image

6 Replies
(@tienthangtn)
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 oh no. I mean is url of admin, not guest. I checked Use Website URL as Profile URL and put admin url website but it still show link, only show link author page


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

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

@tienthangtn,

 I mean is url of admin, not guest. I checked Use Website URL as Profile URL and put admin url website but it still show link, only show link author page

I understand our question. I've just explained how the option works. Everything is correct with the option. It works fine. As I've already mentioned, this option works only from the frontend. I.e, if user fill the URL on the Website field. 

It doesn't have any relation to the dashboard user's website sections. Those are being saved on different Database tables. That's why it doesn't work in your case. 

I'm going to ask developers if there is any solution we can help you. I'll update this topic once I've received any news for you. 


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

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

@tienthangtn,

You can use the following hook code:

add_filter("wpdiscuz_profile_url", function ($profile_url, $user) {
    if (!empty($user->ID)) {
        if (in_array('administrator', $user->roles)) {
            $profile_url = get_home_url();
      }
   }
    return $profile_url;
}, 999, 2);

Put it in the active theme functions.php file. 


(@tienthangtn)
Joined: 4 years ago

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

@asti I read this tutorial in another post. I have tried but no success. thank for your help


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

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

@tienthangtn,

This is a new code not the one provided in previous post. 


(@tienthangtn)
Joined: 4 years ago

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

@asti I just tried it and it still doesn't work


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
(@gitarrenbog)
Active Member
Joined: 2 years ago

Hello,

I know this post is a bit older, but I've encountered the same problem and can't solve it with the above code either.

I would like the link to lead to the user's homepage as it is entered in the user administration. The code above sends me to the author's page.

It would be great if someone could give me a hand.

Thanks and best regards


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
(@gitarrenbog)
Active Member
Joined: 2 years ago

If anyone is still looking ... I think I've found a solution. At least it works on my website.

 

add_filter("wpdiscuz_profile_url", function ($profile_url, $user) {
if (!empty($user->ID)) {
$profile_url = get_the_author_meta("user_url", $user->ID);
}
return $profile_url;
}, 999, 2);


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

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

@gitarrenbog,

Thank you for taking the time to share the solution. We really appreciate it.


Share: