This guide shows how to add a WordPress flag counter in about a minute, with no plugin: you paste one snippet into a footer widget area, because a ranked country list belongs at the bottom, where its lazy-loaded flags stay below the fold. No plugin. WordPress accepts raw HTML in a Custom HTML block, which is all this needs.
The flag counter lists the countries your visitors come from as a ranked list of flags with counts, much like the classic flag counters that used to sit at the bottom of personal sites. It's a friendly way to show international reach on a blog, travel site, language-learning site or community page. Country is worked out from the visitor's IP address, and known bots are filtered out before they're counted.
On WordPress, the right spot is a footer widget area. A ranked list belongs at the bottom of the page, where it doesn't compete with your content, so the footer is the natural spot. The flags are emoji, so there are no image downloads to slow the page.
WordPress.org sites you host yourself can use every method on this page. On WordPress.com, adding scripts with a Custom HTML block or a header plugin needs a plan that allows plugins and custom code (the Business plan or above at the time of writing), because lower WordPress.com plans strip script tags. If you're not sure which you have, check whether your dashboard has a Plugins menu.
WP Rocket, W3 Total Cache, LiteSpeed Cache and your host's edge cache all serve a stored copy of your HTML. Until you purge, you'll be looking at the version from before you pasted and assuming the widget is broken. The widget's own data is fetched client-side on every load, so page caching never makes the numbers go stale — it only hides a freshly-added snippet.
Optimisation plugins that concatenate or defer every script can break an async third-party tag by moving it out of order. If the widget renders nothing after a purge, add the script URL to your plugin's JS exclusion list — in WP Rocket that's File Optimization → Excluded JavaScript Files. Nothing else needs changing.
WordPress sanitises script tags typed into a paragraph or the Visual editor tab, silently. The Custom HTML block, the Classic editor's Text tab, and Elementor's HTML widget all pass markup through untouched. If your snippet vanished on save, that's why.
IP-based country lookup is usually right but not always: VPNs, mobile networks and corporate proxies can place a visitor in the wrong country. New sites will show only a few flags for a while, which is honest but not very impressive.
No plugin. WordPress accepts raw HTML in a Custom HTML block, which is all this needs. Installing a plugin for this would mean another dependency and update cycle just to show one widget.
A footer widget area, because a ranked country list belongs at the bottom, where its lazy-loaded flags stay below the fold.
It adds one small script, loaded asynchronously, so it doesn't block your page from rendering. Any third-party script has some cost, so check your page speed before and after adding it. Your caching and optimisation plugins keep working exactly as before — the only thing to remember is to purge the cache after you paste, otherwise you'll be looking at the stored copy of your old HTML.
Elementor: drag in the HTML widget and paste there. Divi: use a Code module. Beaver Builder: use the HTML module. WPBakery: use the Raw HTML element. Any builder with a raw-HTML or code block will render it.
From the visitor's IP address, looked up against a geolocation database. It's accurate for most visitors, but VPNs and some mobile networks can show the wrong country.