0
我試圖在我的模板中的主要內容之後移動woocommerce產品標籤。Move Woocommerce產品標籤
我使用這個代碼:
<?php do_action('woocommerce_before_main_content'); ?>
<?php if (have_posts()) while (have_posts()) : the_post(); ?>
<?php woocommerce_get_template_part('content', 'single-product'); ?>
<?php do_action('woocommerce_product_meta_start'); ?>
<?php
$size = sizeof(get_the_terms($post->ID, 'product_tag'));
echo $product->get_tags(', ', '<span class="tagged_as"><i class="icon-tag"></i> ' . _n('Tag:', 'Tags:', $size, 'woocommerce') . ' ', '.</span>');
?>
<?php do_action('woocommerce_product_meta_end'); ?>
<?php endwhile; ?>
<?php do_action('woocommerce_after_main_content');?>
但在相關產品和從下Jetpack的插件一些共享按鈕顯示產品標籤,我想產品標籤是剛下的產品說明,但我無法找到如何去實現它。
有什麼建議嗎?也許使用一個函數或一些鉤子?
對不起,我正在嘗試這個功能,但它不工作。我已經粘貼在我的functions.php中,但是網站一片空白。 – xaifu
很可能你犯了一個錯字。另請參閱http://codex.wordpress.org/Debugging_in_WordPress嘗試設置'define('WP_DEBUG',true);'在wp_config.php中 –
你很正常,我會誤輸一行。我已更正它,現在頁面加載,但woocommerce描述/詳細信息/評論選項卡在另一個下,其他網頁下方的網頁不顯示。 – xaifu