我刚刚安装了集成了WooCommerce的Wordpress模板。一切都很好,但是单个产品的标题是简单的文本,我希望将它们转换为产品的链接,如预览图所示。
有人可以帮我解决这个问题吗?谢谢!! http://www.mvdev.it/succhi/
if ( !function_exists( 'sunnyjar_woocommerce_open_thumb_wrapper' ) ) {
//Handler of add_action( 'woocommerce_before_subcategory_title', 'sunnyjar_woocommerce_open_thumb_wrapper', 9 );
//Handler of add_action( 'woocommerce_before_shop_loop_item_title', 'sunnyjar_woocommerce_open_thumb_wrapper', 9 );
function sunnyjar_woocommerce_open_thumb_wrapper($cat='') {
sunnyjar_storage_set('in_product_item', true);
?>
<div class="post_item_wrap">
<div class="post_featured">
<div class="post_thumb">
<a class="hover_icon hover_icon_link" href="<?php echo esc_url(is_object($cat) ? get_term_link($cat->slug, 'product_cat') : get_permalink()); ?>">
<?php
}
}
if ( !function_exists( 'sunnyjar_woocommerce_open_item_wrapper' ) ) {
//Handler of add_action( 'woocommerce_before_subcategory_title', 'sunnyjar_woocommerce_open_item_wrapper', 20 );
//Handler of add_action( 'woocommerce_before_shop_loop_item_title', 'sunnyjar_woocommerce_open_item_wrapper', 20 );
function sunnyjar_woocommerce_open_item_wrapper($cat='') {
?>
</a>
</div>
</div>
<div class="post_content">
<?php
}
}