Archived topic
Single Post Author Template to show data from ACF on Author Profiles
27 replies · Started by Saul on January 24, 2023
I made an edit to the code above;
https://generatepress.com/forums/topic/single-post-author-template-to-show-data-from-acf-on-author-profiles/#post-2509199
I didn't spot i had the_field which displays the field instead of get_field....
Try that, and if you can - would you mind raising a separate topic for the single post issues? i know its kinda related but it may take a few replies and one topic for all can get a bit long :)
No luck! The image still not showing.
I have created a separate topic for single post issues which can be seen here: https://generatepress.com/forums/topic/post-meta-section-to-show-post-author-and-medically-reviewed-by-author/
Can you link me to a page where it is not showing ?
Sent via Private Message!
You didn't change your_field_name to the actual field name, so the code would not work.
https://www.screencast.com/t/UR7LkdiPJnr
My bad! I forgot to update the field in the updated code. I just did that and it worked fine. Thanks!
Glad to hear that :)
Related to the same Single Post Author Template... I have a checkbox type field as you can see in the screenshot: https://prnt.sc/I4bjlbDBt-7B which I want to show on the same Block - Element Loop Template but data added through this field is not showing on the Front-end (https://prnt.sc/8AdGWIER47L4). Here is the field setup in backend: https://prnt.sc/H0XXeg50Q3fv
What value is stored in that custom field ? And is it storing multiple values ?
That field is for authors skills selection in the back-end (https://prnt.sc/R2e_tSDcVTwM) and idea is to show the selected skills in front-end separated with commas (a rough UI here: https://prnt.sc/FVZIQ-VOFEqo). The custom field is set to return both Value and Label. It can have one or more than one selection.
If its a repeater field or an array of values then that is not yet supported in the dynamic data.
You would need an ACF shortcode for that. I found this in the ACF support forum as an example:
https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/#post-57635
Thanks... Will give that a try!
You're welcome