IndieMan Custom Hreflang

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 inLanguage property in Schema.org JSON-LD structured data (WebPage, WebSite, Article).
    • Automatically filters and overrides hreflang attributes in Yoast XML Sitemaps.
  • x-default Support: Optionally output <link rel="alternate" hreflang="x-default" ...> for default language targeting.
  • HTML Lang Override: Replaces <html lang="..."> via native language_attributes filter.
  • Core WordPress Locale Filter: Overrides get_locale() and pre_determine_locale filters.
  • Quick Presets & Live Tag Preview: Easily choose from popular regional presets and inspect generated HTML code in real time.

Screenshots

Installation

  1. Upload the indieman-custom-hreflang folder to the /wp-content/plugins/ directory, or upload the zip archive via Plugins -> Add New -> Upload Plugin.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Navigate to Settings -> Custom Hreflang in the WordPress admin menu.
  4. Select a quick preset or manually enter your desired hreflang code.
  5. 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.

Contributors

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.