Advanced Custom Fields Label

WordPress
September 13, 2022 10:31:16
ccatura
Topics: 1
Messages: 1
We are trying to get the label from advanced custom fields, not the value. Below is the code we are using, and we cannot figure out how to get the label (The nicer looking, formatted version of the name). Thank you.

[meta key="key_personnel" meta="true" implode=", "]
September 13, 2022 13:31:20
E2Pdf
Topics: 7
Messages: 3617
Support
Hi,

1st possible solution:
* If you have "Return Value" under the field set as "Label". Screenshot attached.

Use shortcode as: [acf field="key_personnel" post_id="[id]"]

2nd possible solution:
Use the custom hook to output labels via ACF as unfortunately ACF do not store labels in meta data: https://codeshare.io/LwYq66

It must be added to your functions.php or as a PHP snippet. "keys" must be modified to your field keys which required to output "Labels".

We remain at your service.

We would really appreciate your feedback at WordPress.org!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.