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
- 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?
- How do I display logged-in username IF logged-in?
- How to hide “Filter user list” from “All Users” screen
- How to create a template for a custom URI associated with the user
- How to check user role without using current_user_can()
- How do i auto approve new user?
- BuddyPress | Check if user is in current group [closed]
- Pre-populate Username Field
- Get all commenters on a post
- Adding tags and inputs to a user’s profile
- Best way to have an per-user customized private section
- How to query users who have empty first_name?
- Does wp_delete_user() remove all user content?
- wp_login_form() passing user ID into URL on redirect?
- WordPress API for search
- Where are $current_user->allcaps set?
- How to allow registered users to submit the form only 5 times per day?
- WordPress current month users
- Allow Users to Modify Some Values of Assigned WordPress Pods [closed]
- Can I Create a Second Admin Level User Role?
- Let logged-in users use radio buttons (yes and no) to exclude their author profile from the user listing
- How to auto-generate names for guest users who leave comments?
- Edit text of WordPress “Register” button
- how to retrieve user via rest api using custom meta and/or email
- How to customize user rest api?
- How to limit specific user ID to 5 comments per post?
- REST API list_user
- meta_query orderby sort multiple keys
- Grab user_id inside a function
- Show user details only
- post acces for guests / unregistered users only
- Track users views
- user added by(who added this user)
- What’s the most secure way to grant a user permission to update in a multisite?