You are probably calling it too early and the context for the current post is not filled yet. get_author_posts_url()
accepts author’s ID as first argument, You probably need to retrieve and pass that to it, similar to how you retrieve the info for following call.
Related Posts:
- Hook that get’s triggered when the author of a post is changed
- the_author() returns empty string
- Prevent Authors from viewing each others Posts
- Display Random Author with Details in Sidebar
- How to get Images included in Post
- How to show list of posts by author and category?
- WordPress: How to get the current logged in author page URL?
- How to add editor’s name to entry meta byline?
- Different permalink for posts and authors
- How to know if get_posts() failed?
- How to display posts by current user/author in a custom page template?
- How do I sort (order) the results from `get_children()`?
- Query posts distinct authors
- Restrict the Number of Posts an Author can Publish (over time)?
- Search posts by post author name
- how to display full post with pagination on home page
- Get the user type of an author
- Show the title of the latest post by author
- Find most recent authors
- Show author post count in sidebar – Variable
- Post & edit a post from front end along with upload, dropdown, and other inputs
- How do I change the gallery that is inserted in the post?
- Get current users post URL?
- Get the author of the latest revision
- Filter posts by author and category simultaneously
- 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?
- Posts Page Featured Image [closed]
- Post author is changed to admin after his post is modified by admin
- Displaying Page Title on index.php
- How to enqueue scripts depending on post formats?
- Get all posts by post_author
- How to Replace the WordPress Featured Image with a Video?
- 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?
- Authors in menu, template list post by author
- 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
- Convert a complex webpage into WP theme
- How can I list random authors from current post category?
- How to load a different header based on post format?
- Changing next and previous post link text
- Understand post type
- Mark menu item as current-menu-item for category
- Understanding and using metaboxes in posts
- Why won’t my taxonomy query show up?
- How can I show wordpress posts based on author?
- Show info to author only
- Admin Notices don’t display on the admin screen for certain post
- Auto “expire” all of an authors posts on spcific date
- How to get the user meta data for a post?
- Why orderby=”date” does not support manually changed posts?
- Static page does not show my posts
- Limit posts per author role (excluding admin) in home page
- I am unable to publish/update post
- page.php showing loop of posts and not page content
- Guest Author – How to display posts on /author/ archive page
- Custom WordPress Theme: Publish Date and Display Date for posts right beside each other
- How can I show many posts an author has per week?
- How to give capability (publish contributors posts) to author role?
- How to show single post page as home page
- Whitelist Author of Private Post
- Exclude category from
- Blog page not working
- How to display the link (title) and thumbnail post?
- Underscores Theme Unit Testing – Catching Untitled Posts
- get_the_excerpt() is not working as expected – returns wrong text
- Show posts by a custom post author
- How to use format post in a pertinent way
- Unable to restore from backup – how to obtain old blog posts?
- Getting the current author (it has changed) of a post, not the original author
- Showing author page if user has no post
- Disable sticky option for specific categories
- Highlight static blog page link in header
- How to create a template for Pages?
- Display Notification Bar on Header on Certain Post Count
- How do I do a page break?
- How do I retrieve a users’ last 5 posts?
- obtain the author id given the post id
- Show comment number per author per day
- Get all comments of author’s posts
- (solved) getting post author’s user role
- Block editors annoying warnings
- Change all author links in Blog roll
- What does WordPress do if I save a post without content/title? [duplicate]
- Display author’s name and avatar in post’s sidebar
- How to add a class to edit_post_link?
- Admin – no Featured image choice in create new/page|post
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- static landing page leading to author specific pages w/ “live” content
- No matching template found when using single.php
- Is there a block to print post link standalone in a block theme?
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- Header and Footer options in pages and posts
- WordPress Ajax load doesn’t work
- users followin the blog post author
- Show category name in category.php when posts assigned to multiple categories
- Show posts assigned to multiple categories in current category page