预计阅读时间: 2 分钟

PHP代码段1:在WooCommerce商店页面上删除标题


add_filter( 'woocommerce_show_page_title', 'bbloomer_hide_shop_page_title' );
 
function bbloomer_hide_shop_page_title( $title ) {
   if ( is_shop() ) $title = false;
   return $title;
}

PHP Snippet 2:删除标题@ WooCommerce产品类别页面


add_filter( 'woocommerce_show_page_title', 'bbloomer_hide_cat_page_title' );
 
function bbloomer_hide_cat_page_title( $title ) {
   if ( is_product_category() ) $title = false;
   return $title;
}

PHP代码段3:删除标题@ WooCommerce产品存档页面(商店,类别,标签等)


add_filter( 'woocommerce_show_page_title', '__return_null' );
此文章对你有帮助吗? 已有 1 人说这篇文章是有用的。