Plugin Directory

Test out the new Plugin Directory and let us know what you think.

WP Country

Provides WP_Country PHP class to get countries list as an array and dropdown country select for use in other plugins and themes.

Advanced usage: dropdown($blank, $echo, $args)

Parameters Description

  • blank: if not empty then <option value=''> will be added into dropdown list. Default: ''.

  • echo: prints the list if true else returns. Default: true.

  • args: an array of extra parameters. Default: array('include' => array(), 'exclude' => array(), 'name' => 'country', 'id' => '', 'selected' => array(), 'multiple' => false).

Description of `args` components

  • include, exclude: an array of country codes (alpha2) should be included into dropdown list or excluded from it.

  • name: name attribute of the SELECT tag.

  • id: id attribute (not displayed by default).

  • class: class attribute of the SELECT tag (empty by default).

  • multiple: enables multiple select.

  • selected: adds the selected attribute.

Requires: 3.6 or higher
Compatible up to: 4.5.7
Last Updated: 12 months ago
Active Installs: 200+


0 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.