Home › Forums › Front-end Issues › Showing Author Custom Fields on Elementor › Reply To: Showing Author Custom Fields on Elementor
This is because on the “Author” page WP is querying the author, but on the single post page WP is querying the post.
Elementor can only get values from the currently queried object, that means that on the single post page it can only get values from the post and it will not be able to get values from the user that created that post. I don’t know if this ca be done in elementor with one of their widgets, you might want to look at the “Author” widget for your single posts, but like I said, I don’t know if this widget has the ability to add custom fields.
You might need to create custom code to do this, I do not have any examples I can point you to. It will likely mean creating a custom shortcode and in the shortcode getting getting the post ID, then getting the user (author) ID and returning the value from the ACF field for the user.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.