Use get_the_author_link()
or get_the_author_meta('user_url', $user_id)
. Your code would become something like:
$author_link = get_the_author_link();
$header .= '<div><a href="'. $author_link . '">' .get_avatar($user_ID, 64).'</a></div>';
$header .= '<div><strong><a href="' . $author_link . '">' . __("", "front-end-pm").' '. fep_get_userdata($user_ID, 'display_name', 'id') .'</a></strong>';
Watch out with the quotes though, your code seems to use double quotes, I tried to replace it with single ones but you might have to check that in detail.
If this doesn’t work, use $author_link = get_the_author_meta( 'user_url', 64 );
on the first line. This depends if you’re inside the loop or not.
Related Posts:
- Upload gravatar in WP profile?
- Give users alternative/second avatar that is rectangle sized
- I need a link that directs the user that is logged to his profile
- How to create a link to a user’s profile page
- Force Profile link for username, and stop “Website” field on Profile from becoming offsite link atop Comments, in “Recent Comments” list, etc
- Make display name unique
- How to change user`s avatar?
- How to create a public profile for authors/contributors/users?
- Force users to complete their profile after they register? How to
- add ‘file upload’ field to user details
- Completely hide user info
- Drop down list in user profile page
- Changing default Buddypress avatar affects all site avatars (because gravatar)
- Custom style on profile options page
- Add custom fields to the user profile
- Cannot set user passwords
- Is there any function available to echo current user’s profile url?
- How to add local users to wordpress without email password?
- Disable user profile editing for one user
- how to make a profile entry read only except for site managers [closed]
- Forcing WordPress to work differently
- How to link avatar and nickname to profile
- Remove user profile field [duplicate]
- How to add a user profile page to frontend?
- Is there a way to make custom fields only editable by administrators?
- Including users in insert link internal link search in Gutenberg
- Editable registration date field in user profile
- Profile page for user roles
- User profile updates password even if not filled (Theme my login) in Firefox? [closed]
- How to change user`s avatar?
- How to Create a User Profile Page?
- Prevent subscribers to changing certain profile fields
- Creating User Profiles using author.php
- How to set custom avatar for users?
- Create a “user log”
- How to display text if profile fields are not filled?
- What is correct way to change user’s email?
- How to set all external links from a certain user to “nofollow”?
- How to hide user profile fields based on the role of the viewed user?
- User can manage one page accessible by everyone?
- redirect user to their profile after log in
- How to display all user profile info in myaccount page wordpress
- How to add extra field in profile page and show in myaccount?
- WordPress 5.8 – Hide or Remove personal fields from admin Profile page
- How do I update user email from frontend input field?
- How to display extra fields for user
- How can i display pagination in custom comment list?
- How can i add user display name drop down menu in frontend?
- How to create page for user?
- How to make custom user profile page public?
- update custom field user profile from front end form
- Require confirmation of current user’s email before updating database and before send_email_change_email
- Showing extra profile fields in admin – problem with underscore
- Restrict Access to the User Profile
- Add an ‘edit profile’ page with Genesis
- Manage user profiles with WordPress
- Separate Profiles for Users
- Fetching posts that match a User Profile setting
- Validate user meta and redirect
- Designing a member area on my site
- Storing additional information about the user
- Modify Profile Biographical Info Field
- How to create front-end (editable) WordPress user profile pages?
- Securely log in a user without a password using a link?
- Disable editing profile for second time
- What techniques can a user employ to achieve a password rated “strong” in the WordPress password checker
- Cant edit profile from frontend
- Can we get user profile page using user_id in the URL?
- If the current user is an administrator or editor
- Editor can create any new user except administrator
- How do I add a field on the Users profile? For example, country, age etc
- How do I display logged-in username IF logged-in?
- How to allow an user role to create a new user under a role which lower than his level only?
- user_login vs. user_nicename
- How to programatically change username (user_login)?
- Change the Author Slug from Username to Nickname
- Remove Ability for Other Users to View Administrator in User List?
- Difference between update_user_meta and update_user_option
- Make WooCommerce pages accessible for logged in users only
- Find out if logged in user is not subscriber
- WordPress usermeta scaling for thousands of users
- How to get WordPress Username in Array format
- Display user registration date
- Get multiple roles with get_users
- get_user_meta() doesn’t include user email?
- Confirmation required on email change
- How to Merge Two Authors Into One?
- Whats the best way to share user data across multiple WordPress websites?
- get_current_user_id() returns 0?
- How to get userid at wp_logout action hook?
- Groups of capabilities: users with multiple roles?
- Is there a way to merge two users?
- User-edit role setting distinct from wp_capabilities? [closed]
- List users by last name in WP_User_Query
- What’s the difference between the capability remove_users and delete_users?
- How to restrict access to uploaded files?
- Automatically delete inactive users after 2 months
- How to change user_login with wp-cli?
- Delete all subscribers from wp_users and wp_usermeta a few thousand at a time
- Email user when password is reset by admin