跳到内容

SEV Simple hreflang

v1.4.0

Heinrich Franz · 2026年8月24日 上架

Adds hreflang alternates for pages, posts, and categories and outputs them correctly in the page head — including a self-referencing link.

正在使用
10 以下
评分
暂无
累计下载
366
最近更新
2026年9月14日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

贡献者

截图

Sidebar panel in the block editor, with the hreflang alternates for a page.
Sidebar panel in the block editor, with the hreflang alternates for a page.
The "hreflang Language Link" block in the block inserter, ready to be added to the Navigation block.
The "hreflang Language Link" block in the block inserter, ready to be added to the Navigation block.

SEV Simple hreflang adds a field to pages, posts, and categories where you can enter any number of alternate-language versions (hreflang + URL). The plugin automatically outputs these as <link rel="alternate" hreflang="…"> tags in the <head> of the corresponding view — including a self-referencing link to the page itself, as recommended by Google.

Why no block for the hreflang tags themselves?

hreflang annotations are only evaluated by search engines in the <head> (or via HTTP header or sitemap), not in the visible page content. A block inserted into the content would end up in the <body> and simply be ignored. That’s why this plugin deliberately uses post/term meta for the hreflang data itself, instead of a block.

Language Link block for the Navigation block

For block themes, the plugin also adds a “hreflang Language Link” block that can be inserted inside the Navigation block. Set the target language (e.g. en-US) and the block links to the current page’s hreflang alternate for that language. If the current page has no matching alternate, the menu item is left out of the navigation entirely — not just hidden.

Features

  • Sidebar panel in the block editor for pages and posts.
  • Dedicated form field when adding/editing categories (there’s no block editor there).
  • Also supports the static “Posts page” (Settings > Reading).
  • Automatic self-referencing hreflang link, based on the site’s language.
  • Language Link block for the Navigation block, shown only where a translation exists.
  • No settings, no external calls — just activate it.

Multisite

The plugin is fully multisite-compatible. It can be network-activated (active on every site) or activated per site individually, whichever fits your setup — each site keeps its own hreflang data, since post/term meta is already scoped per site.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums