woof_seo_text
过滤在筛选搜索页面商店循环后显示的SEO文本块,允许自定义在筛选产品下方显示描述性内容。
参数
$txt (string) — 替换SEO规则“text”配置中的变量后的SEO文本内容
源文件
ext/url_request/classes/seo.php:401
代码示例
add_filter('woof_seo_text', function($txt) {
return $txt . '<p>' . __('Browse our curated selection.', 'my-theme') . '</p>';
});
使用说明
- 仅当 $rule['text'] 不为空且 do_index() 返回 true 时输出。
- 内容通过 echo 输出,并包裹在一个带有类名 'woof_seo_text' 的 div 中。
- 输出在显示前会使用 wp_kses_post() 进行清理。