PHPackages                             hellonico/acf-country - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hellonico/acf-country

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

hellonico/acf-country
=====================

A country field for ACF.

v3.0.1(2y ago)12193.2k↑44.1%17[7 issues](https://github.com/nlemoine/acf-country/issues)[1 PRs](https://github.com/nlemoine/acf-country/pulls)PHPPHP ^7.4 || ^8.0CI passing

Since Jan 8Pushed 2y ago6 watchersCompare

[ Source](https://github.com/nlemoine/acf-country)[ Packagist](https://packagist.org/packages/hellonico/acf-country)[ RSS](/packages/hellonico-acf-country/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (17)Used By (0)

ACF Country field
=================

[](#acf-country-field)

[![Latest Version](https://camo.githubusercontent.com/65abbdf2bdbb11cf3302ad8868656243fb9388faa576ed5361d7c087dfac1f76/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656c6c6f6e69636f2f6163662d636f756e7472792e7376673f7374796c653d666c61742d737175617265)](https://github.com/nlemoine/acf-country/releases)[![Packagist](https://camo.githubusercontent.com/65a432b36dbd09423376e4ab34629741413b8d1b9c8aa89a9e1550a627227cef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68656c6c6f6e69636f2f6163662d636f756e7472792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hellonico/acf-country)[![Beerpay](https://camo.githubusercontent.com/a78c6964efaf9a36ed13e513573cb3716274e59216d1f228b99218eea7de886d/68747470733a2f2f626565727061792e696f2f6e6c656d6f696e652f6163662d636f756e7472792f62616467652e7376673f7374796c653d666c61742d737175617265)](https://beerpay.io/nlemoine/acf-country)[![Donate](https://camo.githubusercontent.com/7ae47813ac1647f706f0974d7eb11bb75e1c1f731716460d411f0fc594313723/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://paypal.me/hellonico)

Adds a 'Country' field type for the [Advanced Custom Fields](http://wordpress.org/extend/plugins/advanced-custom-fields/) WordPress plugin.

⚠️ WARNING ⚠️
-------------

[](#️-warning-️)

**From version 2.0.0, ACF Country introduced some important breaking changes**:

- Dropped support for older PHP &amp; ACF versions, new requirements are:
    - ACF 5.7+
    - PHP 5.4+
- Return format has changed. To better stick to ACF and make use of ACF functions, ACF Country will now return values the same way select field do. `['FR' => 'France']` will now look like `['label' => 'France', 'value' => 'FR']`

Looking for a ACF pre 5.7 support? Check the [1.0 branch](https://github.com/nlemoine/acf-country/tree/1.0).

### Overview

[](#overview)

Display a select list of all countries in your language.

Country names are available in every language ([see available list](https://github.com/umpirsky/country-list/tree/master/data)). By default, country names are localized in your current WordPress language.

Select a single value:

[![ACF Country field](https://cloud.githubusercontent.com/assets/2526939/24555414/5c045c7c-1631-11e7-815a-35b6b6903e36.png)](https://cloud.githubusercontent.com/assets/2526939/24555414/5c045c7c-1631-11e7-815a-35b6b6903e36.png)

Or multiple ones:

[![ACF Country field](https://cloud.githubusercontent.com/assets/2526939/24555413/5bf05402-1631-11e7-8d7e-74d425a3eae4.png)](https://cloud.githubusercontent.com/assets/2526939/24555413/5bf05402-1631-11e7-8d7e-74d425a3eae4.png)

### Compatibility

[](#compatibility)

- ACF 5.7+
- PHP 5.4+

### Field options

[](#field-options)

OptionDefaultDescriptionDefault valueemtpySet a default value for the country field (as country code)Allow null`false`Enable/disable null valueAllow multiple`false`Enable/disable multiple countries selectionStylised UI`true`Enable/disable enhanced select field thanks to [Select2](https://select2.github.io/)Return format`value` See [ACF Select field](https://www.advancedcustomfields.com/resources/select/)### Filters

[](#filters)

You can remove (or add) some countries with the `acf/country/countries` filter, example:

```
add_filter( 'acf/country/countries', function( $countries ) {
	return array_filter( $countries, function( $code ) {
		return !in_array( $code, ['IC', 'EA'], true );
	}, ARRAY_FILTER_USE_KEY);
} );
```

*Note: PHP5.6+ example*

### Installation

[](#installation)

#### Zip

[](#zip)

[Download the plugin](https://github.com/nlemoine/acf-country/releases/latest) and extract the archive to your plugins folder.

#### Composer

[](#composer)

```
composer require hellonico/acf-country
```

### Contributing

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.MD).

### Support

[](#support)

This ACF field was originally developed for a personal project I don't use anymore. I still decided to maintain it anyway. If you use it in a commercial project, please consider [buying me a beer](https://beerpay.io/nlemoine/acf-country).

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 86.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~187 days

Recently: every ~33 days

Total

15

Last Release

794d ago

Major Versions

1.4 → 2.0.02018-12-03

2.0.x-dev → v3.0.02024-02-23

PHP version history (2 changes)1.1.0PHP &gt;=5.3.0

v3.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/62f16c9d375343e12eb02b2a3095dc9a02047287b5f12f75ef4c59929fcb2802?d=identicon)[n5s](/maintainers/n5s)

---

Top Contributors

[![nlemoine](https://avatars.githubusercontent.com/u/2526939?v=4)](https://github.com/nlemoine "nlemoine (75 commits)")[![Ninodevo](https://avatars.githubusercontent.com/u/5016559?v=4)](https://github.com/Ninodevo "Ninodevo (6 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![Skatox](https://avatars.githubusercontent.com/u/177008?v=4)](https://github.com/Skatox "Skatox (1 commits)")

---

Tags

acfacf-country-fieldadvanced-custom-fieldscountrywordpresswordpress-pluginwordpresswordpress plugincountryacfadvanced custom fieldsacf-field

###  Code Quality

Code StyleECS

### Embed Badge

![Health badge](/badges/hellonico-acf-country/health.svg)

```
[![Health](https://phpackages.com/badges/hellonico-acf-country/health.svg)](https://phpackages.com/packages/hellonico-acf-country)
```

###  Alternatives

[log1x/acf-editor-palette

A replica Gutenberg color picker field for Advanced Custom Fields.

100284.1k](/packages/log1x-acf-editor-palette)[log1x/navi

A developer-friendly alternative to the WordPress NavWalker.

367633.2k7](/packages/log1x-navi)[vinkla/extended-acf

Register advanced custom fields with object-oriented PHP

503264.8k11](/packages/vinkla-extended-acf)[log1x/acf-phone-number

A real ACF phone number field.

12072.5k](/packages/log1x-acf-phone-number)[freemius/wordpress-sdk

Freemius WordPress SDK

303101.4k4](/packages/freemius-wordpress-sdk)[samrap/acf-fluent

A fluent interface for the Advanced Custom Fields WordPress plugin

28656.0k4](/packages/samrap-acf-fluent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
