我想在wooocommerce的单一产品页面中添加一些内容。但我不知道怎么做。
add_action(\'woocommerce_after_single_product\',\'woo_after_product\');
function woo_after_product() {
if(is_product_category(\'mobile-covers\')) {
?>
<div class="specs-wrapper">
<div class="img-wrapper">
<img class="spec-img" src="http://uperfect.co/wp-content/uploads/2019/04/transparentDiamond_1.png" alt="Product size and specs">
</div>
<div class="content-wrapper">
<ul class="p-desc">
<li>
<p class="spec-title">1. Complete protection
</p>
<p class="spec-content">Impact-resistant, durable hard plastic case with an extremely slim profile, with raised front bezel for extra screen protection.
</p>
</li>
<li>
<p class="spec-title">2. High quality printing
</p>
<p class="spec-content">Expect no peeling, chipping, or wearing off.
</p>
</li>
<li>
<p class="spec-title">3. Free access to buttons
</p>
<p class="spec-content">Complete access to all standard buttons and ports, tailored for your device.
</p>
</li>
<li>
<p class="spec-title">4. All side design
</p>
<p class="spec-content">Case covers 100% of the outer surface of the phone, precision moulded with no seams or sharp edges.
</p>
</li>
</ul>
</div>
</div>
<?php
}
}
我申请的是产品类别。但我的逻辑是,这些内容应该只显示给带有catgeory“手机套”的产品。我将如何做到这一点。提前感谢