Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACF Shortcode Compatibility for Formats in Array #79

Open
iamkevinmccarthy opened this issue Oct 17, 2023 · 0 comments
Open

ACF Shortcode Compatibility for Formats in Array #79

iamkevinmccarthy opened this issue Oct 17, 2023 · 0 comments

Comments

@iamkevinmccarthy
Copy link

iamkevinmccarthy commented Oct 17, 2023

The basic use of the ACF shortcode works to display the number, but only seems to display the e164 format.

An example of Phone Number field called "phoneNum" with a United States number of 555-123-4567:

[acf field="phoneNum"]

Displays as

+15551234567

With some objects in ACF — e.g., repeater fields — we can use underscores drill down a bit into the field. Example:

[acf field="{$repeater_name}_{$row}_{$sub_field_name}"]

Support for uses such as the following would be great for the potential of this field:

[acf field="phoneNum_national"]

[acf field="phoneNum_uri"]

[acf field="phoneNum_location"]

And so on. Presumably, each value in the array would be a type of "sub field" that can then be called using a similar shortcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant