提问人:iTechmap 提问时间:8/31/2023 最后编辑:LoicTheAzteciTechmap 更新时间:8/31/2023 访问量:80
如何在 WooCommerce 8 中将循环产品标题 html 标签 h2 更改为 p
How to change in loop product title html tag h2 to p in WooCommerce 8
问:
我正在尝试将产品类别中产品的 WooCommerce-loop-product__title从 H2 更改为 P,并在主页中更改为 H3。
我正在使用 Martfury,一个 WooCommerce Marketplace WordPress 主题。
我已经尝试了将 woocommerce-loop-product__title 从 H2 更改为 H6 中提到的两种方法,但没有成功。
- 方法1:这将导致网站上出现错误。
- 方法二:只在 上面加一个,保持不变。
<p>product title</p>
<h2>product title</h2>
<h2>product title</h2>
- 方法3:我尝试修改WooCommerce的PHP文件以将H2更改为P,但没有成功。
此外,当使用:
remove_action( 'woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title', 10 );,
<h2>product title</h2>
仍然出现。
我希望有人可以指导我如何解决这个问题。
具体来说,主页上的 WooCommerce-loop-product__title 应该是 H3,而在产品类别中,WooCommerce-loop-product__title 应该改为 P。
我正在尝试将产品类别中产品的 WooCommerce-loop-product__title从 H2 更改为 P,并在主页中更改为 H3。
答: 暂无答案
评论
woocommerce_shop_loop_item_title
content-product.php
woocommerce_shop_loop_item_title
content-product.php