WPGO documentationSVG Flags

Free and Pro workflow guide

Place the right flag, in the right format, without maintaining SVG files by hand.

Choose from 271 verified country, territory, regional, and organisation flags, publish one flag or a responsive grid, and select accessible image output when the country name must be conveyed. This guide covers SVG Flags Free and Pro 0.9.7.

Current documentation Version 0.9.7Released 10 August 2026See what changed

Reviewed11 August 2026

PluginSVG Flags 0.9.7

RequirementsWordPress 6.3+ · PHP 7.4+

Quick start

Add an accessible flag image

  1. Install and activate either SVG Flags Free or SVG Flags Pro—not both editions together.
  2. Edit a post or Page and insert the SVG Flag Image block.
  3. Choose a country, territory, region, or organisation in the searchable selector.
  4. Set the width and unit; enable the square option only when the 1:1 artwork suits the layout.
  5. Enable the country-name caption when visible identification helps the reader.
  6. Preview the published Page and confirm the image alternative text names the selected flag.

Checkpoint: use SVG Flag Image when the flag carries meaning. Its img output uses the catalogue country name as alternative text; the decorative Pro heading image intentionally uses an empty alternative.

Choose the output that matches the job

FreeSVG Flag

CSS-backed flag symbol for compact inline or block-level presentation. Use it when the adjacent text already supplies the meaning.

FreeSVG Flag Image

Lazy-loaded image with country-name alternative text, optional caption, and Pro border or spacing controls.

FreeSVG Flag Grid

Responsive multi-flag gallery with validated, deduplicated codes, one to eight columns, and optional names.

ProSVG Flag Heading

Semantic H1–H6 containing a decorative flag before plain heading text.

The complete reference records 13 settings for SVG Flag, 17 for SVG Flag Image, eight for SVG Flag Grid, and 19 registered attributes for SVG Flag Heading. Eleven heading attributes are retained for saved-content compatibility but are not consumed by the current 0.9.7 renderer; the generated heading reference labels each one instead of implying an active effect.

Use the bundled catalogue, not an assumed country list

Version 0.9.7 contains exactly 271 unique codes. Every code has both 4:3 and 1:1 SVG artwork. The catalogue includes current countries plus supported territories, regions, and organisations; the editor shows the label and code together so similar names can be distinguished.

  • Shortcodes accept lower- or uppercase codes and normalize them against the catalogue.
  • An invalid single-flag code falls back through the renderer’s normalization path instead of constructing an arbitrary asset URL.
  • The grid removes invalid and duplicate codes and caps output at 100 items.
  • Enabling Random selects one supported catalogue entry during each server-side render.

Build a responsive multi-country grid

The grid renderer produces one figure per valid code. With captions enabled, each figure displays the catalogue name and its image also carries that name as alternative text. The grid settings accept the units px, em, rem, %, and vw; use a constrained width and fewer columns when labels are long.

Know the Free and Pro boundary

SVG Flags 0.9.7 edition boundary
CapabilityFreePro
Flag catalogueAll 271 flags in 4:3 and 1:1 artwork.Includes the Free catalogue.
BlocksSVG Flag, SVG Flag Image, and SVG Flag Grid.Adds SVG Flag Heading.
Single-flag identityCountry selection, size, aspect ratio, caption, inline alignment, and random selection where supported.Adds element ID, CSS class, custom tooltip, and custom caption to the applicable single-flag surfaces.
Image presentationWidth, aspect ratio, caption, and inline alignment.Adds border, border radius, padding, and margin to SVG Flag Image.

No global product settings: SVG Flags 0.9.7 exposes its current presentation controls in blocks and shortcodes. Freemius account screens are not SVG Flags rendering settings and are deliberately excluded from the product reference.

Use shortcodes for established or code-led layouts

The active shortcode surfaces are [svg-flag], [svg-flag-image], [svg-flag-grid], and Pro [svg-flag-heading]. The older [svg-flags] alias still routes to [svg-flag]. The retained button shortcode source is not bootstrapped in 0.9.7 and is therefore not a public shortcode.

[svg-flag flag="gb" size="1.25" size_unit="em" inline="true"]
[svg-flag-image flag="ca" size="12" size_unit="rem" caption="true"]
[svg-flag-grid flags="gb,us,ca,fr,de,jp" columns="3" gap="1" gap_unit="rem"]
[svg-flag-heading flag="de" heading="Regional results" heading_tag="h2"]

Shortcode booleans accept values interpreted by the plugin’s truthy conversion. Prefer the exact text true or false. The complete reference gives every released attribute, default, edition, accepted value, alias, and all 21 active PHP filters.

Treat flags as supporting information, not a language selector by themselves

A national flag does not uniquely identify a language, locale, currency, or audience. Pair it with a visible text label and a correctly declared link destination. Use SVG Flag Image or a captioned grid when the identity must be announced; use the CSS-backed symbol only when adjacent text already supplies an equivalent name.

  • Do not rely on colour or flag shape alone to communicate a choice.
  • Keep link or button semantics on the surrounding interactive element; SVG Flags itself renders the visual flag.
  • Check country-name captions at narrow widths and avoid grids whose columns force labels to overlap.
  • The Pro heading flag is decorative because the same heading contains the meaningful text.

Troubleshoot the selected surface first

The expected flag does not appear

Re-select the entry in the editor or verify the shortcode code against the searchable catalogue. The grid silently removes invalid entries; a copied label is not a substitute for the code.

A caption is missing

Confirm caption is enabled and the flag is not rendered inline. Single inline flags intentionally suppress the block caption; place a visible text label beside the flag instead.

The grid has fewer items than supplied

Duplicate and invalid codes are removed after filtering, and only the first 100 supplied values are considered. Check the normalized code list and remove unsupported values.

A Pro heading compatibility field has no visible effect

The current heading renderer consumes flag, size, size unit, square aspect, vertical alignment, random selection, heading text, and heading level. Other saved heading attributes remain registered for compatibility and are marked as such in the complete reference.

Include this context with a support request

  • SVG Flags version and Free or Pro edition.
  • WordPress, PHP, active theme, and editor or page-builder versions.
  • The exact block or shortcode and an anonymised attribute example.
  • The selected flag code, aspect ratio, size, and unit.
  • A screenshot of the block controls and published result when relevant.

Still stuck?

Choose support for your edition.

Pro customers can sign in for private support connected to their purchase. Free-edition questions belong in the public WordPress.org support forum.