wpDiscuz - WordPress Comment Plugin
feature error: Use ...
 
Share:
Notifications
Clear all

feature error: Use Website URL as Profile URL


tienthangtn
Posts: 4
Topic starter
(@tienthangtn)
New Member
Joined: 1 month ago

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

7 Replies
Asti
Posts: 3860
 Asti
Support
(@asti)
Support member
Joined: 4 years ago

Hi tienthangtn,

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

image
Reply
6 Replies
tienthangtn
(@tienthangtn)
Joined: 1 month ago

New Member
Posts: 4

@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

Reply
Asti
 Asti
Support
(@asti)
Joined: 4 years ago

Support member
Posts: 3860

@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. 

Reply
Asti
 Asti
Support
(@asti)
Joined: 4 years ago

Support member
Posts: 3860

@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. 

Reply
tienthangtn
(@tienthangtn)
Joined: 1 month ago

New Member
Posts: 4

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

Reply
Asti
 Asti
Support
(@asti)
Joined: 4 years ago

Support member
Posts: 3860

@tienthangtn,

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

Reply
tienthangtn
(@tienthangtn)
Joined: 1 month ago

New Member
Posts: 4

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

Reply
Share: