Vannkorn

Full Stack Web Developer

Close

Use custom designed flags in Polylang

Default icons in Polylang are too small and blurry so it's better to use a custom designed one with higher resolutions and wider dimensions.

Ads: Register now via this link to receive $100 credit from Vultr

Use custom designed flags in Polylang

Default icons in Polylang are too small and blurry so it’s better to use a custom designed one with higher resolutions and wider dimensions.

To do this, create a /polylang directory either in wp-content or directly in your main or child theme. After that, place the flag icons of your choice in that /polylang directory.

The most important step is the naming convention. Never forget to rename those icon files to match the original ones. For example, I have a newly designed Cambodian flag so I name it km.png. And for the newly designed US flag, I name it en_US.png. See! they both match the original ones.

The last step is to tell Polylang you’re using custom flags.

Go to Languages => Settings then click on URL Modifications and do nothing, then hit Save Changes.

Just click “Save Changes” to invoke Polylang you’re using custom flags.

That’s it! Let me know if this works for you.

4 thoughts on “Use custom designed flags in Polylang

  1. Hi! Please, how do I know the original names that the new flags need to match for this to work?
    Thanks & Best!
    Martina

Leave a Reply

Your email address will not be published. Required fields are marked *