如何从Woocommerce中的产品缩略图中删除超链接?(How do I remove the hyperlink from the products thumbnail in Woocommerc

编程入门 行业动态 更新时间:2024-10-17 21:18:26
如何从Woocommerce中的产品缩略图中删除超链接?(How do I remove the hyperlink from the products thumbnail in Woocommerce?)

我在wordpress网站的主页上有一个div中最畅销的四大产品。 我不希望它们是可点击的,我只是希望它们被显示。 我已设法通过实施删除“添加到购物车”按钮

#trending .add_to_cart_button, #trending span.price { display: none; }

但缩略图和标题标题仍然是超链接。 我四处搜寻并尝试过一些东西,但似乎都没有。 有人能帮忙吗? 所有建议都非常感谢。 先谢谢你!

<div id="popular"> <p class="trending-title">Popular Products</p> <?php echo do_shortcode('[best_selling_products per_page="4"]'); ?> </div>

I have the top 4 best selling products within a div on the home page of my wordpress site. I don't want them the be clickable, I just want them to be displayed. I've managed to remove the 'Add to Cart' button by implementing

#trending .add_to_cart_button, #trending span.price { display: none; }

But the thumbnails and their title headings still remain as hyperlinks. I've searched around & tried a few things, none of which seem to have worked. Can anyone help with this? All suggestions are very much appreciated. Thank you in advance!

<div id="popular"> <p class="trending-title">Popular Products</p> <?php echo do_shortcode('[best_selling_products per_page="4"]'); ?> </div>

最满意答案

终于找到了解决方案......

#popular .woocommerce ul.products li.product { pointer-events: none; }

诀窍。

Finally found a solution...

#popular .woocommerce ul.products li.product { pointer-events: none; }

Does the trick.

更多推荐

I've,电脑培训,计算机培训,IT培训"/> <meta name="description" c

本文发布于:2023-08-06 22:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1456675.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:缩略   图中   超链接   产品   Woocommerce

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!