钩子文档

single_tag_title

💡 云策文档标注

概述

single_tag_title 是一个 WordPress 过滤器钩子,用于修改标签归档页面的标题显示。它允许开发者在标签归档页面中自定义标签名称的输出。

关键要点

  • single_tag_title 是一个过滤器钩子,用于过滤标签归档页面的标题。
  • 它接受一个参数 $term_name,表示当前显示的标签名称。
  • 该钩子在 single_term_title() 函数中被调用,用于显示或检索分类法术语归档的页面标题。
  • 自 WordPress 2.3.0 版本引入。

📄 原文内容

Filters the tag archive page title.

Parameters

$term_namestring
Tag name for archive being displayed.

Source

$term_name = apply_filters( 'single_tag_title', $term->name );

Changelog

Version Description
2.3.0 Introduced.