Description
IndieMan Custom Hreflang provides a clean, reliable solution for website owners and SEO specialists who need full control over their site’s language and regional targeting (hreflang), especially when WordPress or active themes lack the specific regional locale needed (such as uk-UA, sr-Latn-RS, en-US, etc.).
Key Features:
- Manual Hreflang Control: Specify any ISO language and country code (e.g.,
uk-UA,uk,en-US,pl-PL,de-DE, etc.). - Deep Yoast SEO Integration:
- Overrides OpenGraph
<meta property="og:locale">. - Updates the
inLanguageproperty in Schema.org JSON-LD structured data (WebPage, WebSite, Article). - Automatically filters and overrides hreflang attributes in Yoast XML Sitemaps.
- Overrides OpenGraph
- x-default Support: Optionally output
<link rel="alternate" hreflang="x-default" ...>for default language targeting. - HTML Lang Override: Replaces
<html lang="...">via nativelanguage_attributesfilter. - Core WordPress Locale Filter: Overrides
get_locale()andpre_determine_localefilters. - Quick Presets & Live Tag Preview: Easily choose from popular regional presets and inspect generated HTML code in real time.
Screenshots


Installation
- Upload the
indieman-custom-hreflangfolder to the/wp-content/plugins/directory, or upload the zip archive via Plugins -> Add New -> Upload Plugin. - Activate the plugin through the Plugins menu in WordPress.
- Navigate to Settings -> Custom Hreflang in the WordPress admin menu.
- Select a quick preset or manually enter your desired hreflang code.
- Click Save Settings.
FAQ
-
Does this plugin work if Yoast SEO is not installed?
-
Yes! The plugin works independently for core WordPress, outputting
<link rel="alternate" hreflang="...">tags and overriding<html lang="...">. If Yoast SEO is installed, it seamlessly overrides Yoast’s OpenGraph and Schema locales as well. -
Will this plugin slow down my website?
-
Not at all. The plugin runs lightweight, highly-optimized PHP filters with zero external API calls or database overhead.
-
Can I use this for multilingual websites?
-
This plugin is specifically designed to enforce a unified custom regional locale across the entire website. For per-post translations, you can use it alongside your favorite translation workflow.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“IndieMan Custom Hreflang” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “IndieMan Custom Hreflang” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial public release by IndieMan (wp.indieman.com.ua).
- Full support for Yoast SEO, Schema JSON-LD, OpenGraph, and XML Sitemaps via pure native WordPress hooks.
