I’m not certain if this is somehow related to SOLVED: Author dynamic tags not working on author archive, but I have observed that any custom fields associated with a ‘User Role’ can be viewed by users who are logged in, including the editor. However, non-logged-in users are unable to see this information.
For instance, if I am creating an archive or a custom author profile page and wish to display a custom field like ‘acf-author-position’, the data won’t be visible to non-logged-in users.
Thank you for your report. This seems to be different from SOLVED: Author dynamic tags not working on author archive as yours is specific to ACF. Can you please share more details of your ACF & Bricks setup so I can replicate this locally? A screen recording would be much appreciated.
Tried on Bricks ver. 1.8.1 and 1.8.5.
ACF Pro latest version
So basically, I just set up some custom fields and associated them with ‘(All) User Role’, via ACF Pro field group, so every individual user via the WP - User menu can add (custom) personal info about them. Obviously, the next step would be displaying these data via Dynamic Data of, say, a heading or a basic text element, but guest visitors won’t see them.
I had to use a workaround like this (creating and calling a shortcode) to make it work.
<?php
/* The code was created because Bricks before 1.8.1 had an issue showing author/user-related data on the front end for guest users */
$author_id = get_the_author_meta('ID');
$position = get_user_meta($author_id, 'author_position', true);
if (!empty($position)) {
echo $position;
}
?>