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:
- the_author() returns empty string
- Prevent Authors from viewing each others Posts
- Display Random Author with Details in Sidebar
- How to show list of posts by author and category?
- 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?
- 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
- How do I change the gallery that is inserted in the post?
- 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?
- Posts Page Featured Image [closed]
- Post author is changed to admin after his post is modified by admin
- 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?
- 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?
- 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?
- Understand post type
- Mark menu item as current-menu-item for category
- Understanding and using metaboxes in posts
- How can I show wordpress posts based on author?
- 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?
- 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
- 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?
- Whitelist Author of Private Post
- Exclude category from
- Blog page not working
- How to display the link (title) and thumbnail post?
- get_the_excerpt() is not working as expected – returns wrong text
- Showing author page if user has no post
- Disable sticky option for specific categories
- Highlight static blog page link in header
- Show comment number per author per day
- (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
- Admin – no Featured image choice in create new/page|post
- 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?
- 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?
- Change Author Name to Sitename on Frontend
- Exclude a category of posts in author template
- Cant’ Grab WordPress Built-in Posts Through Loop
- Change default post style to columns
- Author Avatar as default first image
- Cannot select certain authors for posts after import
- How do I allow certain users to make a certain type of post?
- How to add a post class on every post. (on homepage)
- Send email to admin with post author
- WordPress Architecture as a CMS – Posts & Pages
- Prevent 404 of Author pages without posts
- Add a field in my rest api
- created post displaying differently on front end
- Author post count in category
- How to pull latest posts from a specific category
- Problem paginating a subquery on a post
- 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?
- Moved a website and excerpts don’t work for old posts
- Integrate video and iframe in a post type gallery
- How to put the WordPress blog into theme
- Displaying a specific sub-category’s posts from wp_query
- Posts only showing on /localhost/wordpress/ and not on other pages
- Post are not showing up
- Blog styling in SASS
- How to show the posts list into a static page? Problems to use the loop into a static page
- wordpress taxonomy results
- Get most recent posts by category that aren’t first overall [duplicate]
- How to get single post by one author?
- The post order is different for logged-in and non-logged-in users? [closed]
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- Echo author slug in post edit page
- Change from all posts to specific categories post on main page?
- Wp_query WooCommerce products
- No matching template found when using single.php
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- WordPress Ajax load doesn’t work
- users followin the blog post author