0
有沒有人遇到過這種情況?這是我第一次與WooCommerce合作。在WooCommerce上添加任何類別時產品消失
如果我沒有將產品添加到某個類別,他們將顯示在主商店頁面中,並且只有一個產品頁面,只要我添加一個類別,他們就不會顯示在主商店頁面上,類別頁面或單個產品頁面。
我沒有以任何方式操縱頁面上的wp_query。
我將其集成到我的自定義主題是真的準系統,我已經改變了唯一的事情是在我functions.php文件如下:
remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'urbantac_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'urbantac_wrapper_end', 10);
function urbantac_wrapper_start() { echo '<div id="products-content" class="products wrap clearfix aligncenter content-container">'; }
function urbantac_wrapper_end() { echo '</div>'; }