-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Output country name with flag icon #14
Comments
Hi @Nick-Fiasco, Sorry, I can't consider your feature request for many reasons.
|
Okay no problem I can look into that. Would you be able to point me in the direction of how to get the split values from the field? So, the country name and the country code as separate values (in order to use the value to control classes for the flags). I'm sure I'm just being a bit stupid, but what I've tried to far doesn't yield both the country code and name, only the name. Any ideas? Thanks |
I assume you get your field value with something like: $country = get_field('my_country_field'); Then you can get values with: $country_name = reset($country);
$country_code = key($country); |
Excellent, that is exactly what I needed! Thank you very much. |
Hi, I'm stuck with the same. I've looked at your suggestion but have no idea how to get that to work. Do you have a working example? |
Hi @nlemoine
Discovered your plugin add-on through ACF, love the idea and just what I need for project.
Delving into the plugin and using it within the dashboard you include a sprite with flags for the select when choosing a country.
I was wondering if there would/could be an option to display that same flag icon with the country name on the front-end? Rather than having to replicate the same kind of code you may already have going within the plugin elsewhere for the front-end.
Could this be done with your plugin add-on?
Many Thanks!
The text was updated successfully, but these errors were encountered: