HUSKY - Product Filter for WooCommerce

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输出,包裹在class为'woof_seo_text'的div中。
  • 输出在显示前使用wp_kses_post()进行清理。