我正在将子主题用于 Woocommerce 的店面主题。在首页,将特色产品的产品名称渲染为h2s。我想将这些更改为 h3s(SEO 原因)。
h2s 使用这个类:woocommerce-loop-product__title。我搜索了 Storefront 主题,发现该类的唯一地方是 CSS。
我查看了这个文件:/storefront/inc/storefront-template-functions.php 并找到了这个代码:
if ( ! function_exists( 'storefront_featured_products' ) ) {
/**
* Display Featured Products
* Hooked into the `homepage` action in the homepage template
*
* @since 1.0.0
* @param array $args the product section args.
* @return void
*/
function storefront_featured_products( $args ) {
if ( storefront_is_woocommerce_activated() ) {
$args = apply_filters( 'storefront_featured_products_args', array(
'limit' => 4,
'columns' => 4,
'orderby' => 'date',
'order' => 'desc',
'visibility' => …Run Code Online (Sandbox Code Playgroud)