The code below is the correct code, in several different PHP files.
Currently need to know how to write it using the
the_author_posts_link();<p class="postAuthor">By <a href="https://wordpress.stackexchange.com/questions/74001/<?php the_author_meta("user_url'); ?>"><?php the_author(); ?></a></p>
Just replace this:
<a href="https://wordpress.stackexchange.com/questions/74001/<?php the_author_meta("user_url'); ?>"><?php the_author(); ?></a>
With this:
<?php the_author_posts_link(); ?>
Alternately, you could use this:
<a href="https://wordpress.stackexchange.com/questions/74001/<?php echo get_author_posts_url(get_the_author_meta("ID' )); ?>"><?php the_author(); ?></a>
Codex references:
Related Posts:
- WordPress: How to get the current logged in author page URL?
- Get current users post URL?
- All Posts Linking to Author Posts directly
- How to use “Add link” pop up for a WordPress widget
- the_author() returns empty string
- Prevent Authors from viewing each others Posts
- Display Random Author with Details in Sidebar
- Portable Post Links
- How to show list of posts by author and category?
- Different permalink for posts and authors
- How to display posts by current user/author in a custom page template?
- Keep getting same permalink with WP_Query?
- Query posts distinct authors
- Restrict the Number of Posts an Author can Publish (over time)?
- Search posts by post author name
- Find most recent authors
- Show author post count in sidebar – Variable
- Get the author of the latest revision
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- Navigation link to specific user page
- Post author is changed to admin after his post is modified by admin
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- How can I control multiple editing of wordpress posts?
- Multiple authors for single post without plugin
- Limit number of posts a user can make per minute?
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Author must complete profile info before they can publish a post?
- WP rest api returns 404 only when author param is used
- How can I list random authors from current post category?
- Link button is not working while editing a post in Firefox [closed]
- Setting up navigation links for posts (first, prev, next, last)
- How can I show wordpress posts based on author?
- Auto “expire” all of an authors posts on spcific date
- How to get the user meta data for a post?
- Limit posts per author role (excluding admin) in home page
- Removing rel=”nofollow” from links posted in Post Content
- Delete post by giving its link
- How can I show many posts an author has per week?
- How to give capability (publish contributors posts) to author role?
- Whitelist Author of Private Post
- Custom loop pagination links not working
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- Getting the current author (it has changed) of a post, not the original author
- get_adjacent_post by language
- Showing author page if user has no post
- Show comment number per author per day
- Get all comments of author’s posts
- (solved) getting post author’s user role
- Change all author links in Blog roll
- Display author’s name and avatar in post’s sidebar
- How to add a class to edit_post_link?
- Can’t get full post title if there a spaces in title
- If contributor has published 2 or more posts then show otherwise hide
- Change post author without using wp_update_post()
- Is it possible to lock all new and existing WordPress posts to one specific author?
- How to make Link to go on the first post
- Restrict displaying posts to the poster itself (in Back-end)
- How can I set a maximum allowed post size and number of posts submitted?
- Get x recent posts by author?
- Exists filter or action that change Add New Post link?
- Change Author Name to Sitename on Frontend
- Exclude a category of posts in author template
- Author Avatar as default first image
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Cannot select certain authors for posts after import
- Short link to read complete post
- Delete all Tag Links from Posts
- Link from Post to Another Post Via Clicking on Words within Original Post
- adding my posts (author posts) in menu
- Link to older links
- How to link post titles on page A to its posts on page B?
- How to create several Post pages
- Prevent 404 of Author pages without posts
- Edit post & page option does not display on latest wordpress
- how to show comments only author which send own posts in wordpress
- Add data attribute of post_id for Internal links
- Author post count in category
- Prevent the automatic URL linking added in last update
- Change of author not updating
- Some custom post types did not return an object
- How do I remove all links from all my posts at once?
- Display post by Random Authors on Page Refresh
- What permissions does a role need for the user to be assigned as the author of a post?
- Creating a link to the first post in a category
- On WordPress Search, how to search post from Author meta also
- How to hide meta from search result only on pages?
- Numbering author posts in posts query
- Custom author search
- Post List Widget with custom posts and editing the Read More Link
- Getting posts from multiple users?
- My posts section for logged in user
- Modifying the permalink href for posts with jquery
- How to get single post by one author?
- how to show all type of author posts in author page (SOLVED)
- Echo author slug in post edit page
- After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- Automatically search and replace link in content (pages/posts)?
- How to remove category and other tags from posts page