Comments (5)
Hi @Nick-Fiasco,
Sorry, I can't consider your feature request for many reasons.
- Some users might not be interested in having those flags. Maybe they'll use their own flag icon set. But the plugin will still load an extra stylesheet and image.
- It's really easy to add them to your theme stylesheet using any package manager: https://github.com/legacy-icons/famfamfam-flags/tree/master/dist/sprite
- Moreover, I don't like backend plugins messing with the front-end. I'm mostly a front-end developer and I like to keep things separated. There's enough plugins including scripts and styles out there ;)
from acf-country.
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?
I'm using the default country code and country name, but struggling to actually output the different values from the array.
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
from acf-country.
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);
from acf-country.
Excellent, that is exactly what I needed!
Thank you very much.
from acf-country.
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?
Many thanks!
from acf-country.
Related Issues (20)
- Are you planning to add this plugin to the WordPress Plugin Directory? HOT 2
- Make get_countries() public HOT 1
- Country select interface doesn't work, throws JS error HOT 1
- Dependabot can't resolve your PHP dependency files
- Option for other languages HOT 2
- Dependabot can't resolve your PHP dependency files
- In admin select field selected choice displays as html HOT 16
- Flags not shown after updating til ACF Pro HOT 1
- Data was clean after saving
- Not compatible with Admin Columns Pro HOT 1
- How do you keep country names up-to-date? HOT 5
- Country Name
- If i order the query i lost country name
- Breaks "Toolset" Custom Post Types HOT 1
- Uncaught TypeError: u.data.field.get is not a function
- Country name does not display on front end
- rename v3 main plugin file HOT 8
- Conflict with Admin Columns Pro HOT 6
- version number not updated HOT 1
- Plugin donation link not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-country.