CSS Flags library

CSS Flags library

Wordpress plugin

Install on Wordpress

App Details

The CSS Flags plugin / library for WordPress loads a dynamicaly created CSS with responsive flags.

Note: CSS Flags is not a standalone plugin/library, To display the flags you will have to add code to your theme using your own plugin or theme functions.php

You can view the flags at my site

Sample CSS:

.css-flag.sami { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHZlcnNpb249IjEuMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAyMCIgaGVpZ2h0PSIxNTAwIj48cmVjdCB3aWR0aD0iNjQ1IiBoZWlnaHQ9IjE1MDAiIGZpbGw9IiNkODFlMDUiLz48cmVjdCB4PSI2NDUiIHdpZHRoPSIxNDAiIGhlaWdodD0iMTUwMCIgZmlsbD0iIzAwN2EzZCIvPjxyZWN0IHg9Ijc4NSIgd2lkdGg9IjE0MCIgaGVpZ2h0PSIxNTAwIiBmaWxsPSIjZmNkMTE2Ii8+PHJlY3QgeD0iOTI1IiB3aWR0aD0iMTA5NSIgaGVpZ2h0PSIxNTAwIiBmaWxsPSIjMDAzOGE4Ii8+PHBhdGggZD0iTSA3ODUsMzEwIGEgNDQwIDQ0MCAwIDAgMCAwLDg4MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAzOGE4IiBzdHJva2Utd2lkdGg9IjgwIi8+PHBhdGggZD0iTSA3ODUsMzEwIGEgNDQwIDQ0MCAwIDAgMSAwLDg4MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDgxZTA1IiBzdHJva2Utd2lkdGg9IjgwIi8+PC9zdmc+'); height: 100%; width: 134.666666667%; background-size: 100% 100%; } .css-flag.sami-landscape { height: 100%; width: 134.666666667%; } .css-flag.sami-portrait { height: 74.2574257426%; width: 100%; } 

Usage

The total CSS file size is 4 MB, and you don’t want to send all that data back to the users, so you must use one of the following filters in your plugin or theme.

css_flags_countries: Load flags for one or more countries

add_filter('css_flags_countries', function() { return array('no'); // Array with ISO_3166-1_alpha-2 country codes: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements }); 

css_flags_regions: Load the flags for one or more regions. You can choose between europe, oceania, africa, asia, northamerica, southamerica and middleeast.

add_filter('css_flags_regions', function() { return array('europe'); //europe, oceania, africa, asia, northamerica, southamerica, middleeast }); 

css_flags_exclude: Exclude some countries from the list. This filter must be used in combination with the css_flags_countries or css_flags_regions filters

add_filter('css_flags_exclude', function() { return array('eu'); }); 

css_flags_cachetime: Change the cache time, default it’s 7200 (60x60x2 = 2 hours)

add_filter('css_flags_cachetime', function() { return 172800; // 2 days }); 

If you must (but you shouldn’t), you can load all the CSS flags using the following:

add_filter('css_flags_countries', function() { return array('all'); // load all country flags (don't it's 4MB) }); 

More information at GitHub

Credits

The original CSS file is from http://www.phoca.cz/cssflags/. If you only need the CSS file, grab it there.

Pricing

Starting from $0 per month.

Check Out the Live Weather Forecast Widget

By Common Ninja

Live Weather ForecastTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

header
link

Developed By

Per Søderlind

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Live Weather Forecast for Wordpress logo

Live Weather Forecast

Use a live weather forecast widget to show current conditions and upcoming predictions, giving visitors real time local weather updates for better planning.

Sticky Video for Wordpress logo

Sticky Video

Use a sticky video that stays visible while users scroll to keep content in view, increase watch time, and boost engagement.

Bluesky Feed Carousel for Wordpress logo

Bluesky Feed Carousel

Display Bluesky posts with a Bluesky feed carousel that auto updates, shows posts in a clear layout, and keeps visitors engaged.

GDPR Cookie Notice for Wordpress logo

GDPR Cookie Notice

Show a GDPR-ready cookie notice that clearly explains how cookies are used, helping you stay compliant while creating a more transparent experience for your visitors.

Diagrams for Wordpress logo

Diagrams

Create interactive diagrams with a diagrams widget that lets you build and customize flow charts, improve clarity, and help visitors understand complex ideas easily.

Team Members Blobs for Wordpress logo

Team Members Blobs

Use team members blobs to present your staff in a clear, creative format that builds trust, supports transparency, and strengthens brand credibility.

Audio Player for Wordpress logo

Audio Player

Add a no-code audio player to your site and boost engagement with music, podcasts, and voice content effortlessly.

Email Subscription Form for Wordpress logo

Email Subscription Form

Capture email leads with an email subscription form that collects addresses, saves entries, sends notifications, and helps grow your audience.

Facebook Feed for Wordpress logo

Facebook Feed

Show Facebook posts in a live Facebook feed that keeps content fresh, boosts social proof, and helps visitors engage more with your brand.

Video Carousel for Wordpress logo

Video Carousel

Showcase videos with a video carousel that rotates or slides clips, improves visual design, and keeps visitors watching and engaged.

Card Carousel for Wordpress logo

Card Carousel

Showcase content with a card carousel that combines images and text, improves visual design, and helps visitors explore key information.

Interactive Video Player for Wordpress logo

Interactive Video Player

Add interactive video overlays with links, product cards, and buttons that appear on top of your videos to boost engagement and guide user actions.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms