2
remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30);
編輯刪除從我的店鋪頁面here排序選項:我已經嘗試了不同的優先級值,包括10,這是關鍵包含下面outpur中的動作的數組。仍然沒有快樂!
它可以在其他網站上正常工作,但不是這個(使用Nova WP主題,店面的孩子)。
當我添加
global $wp_filter;
echo '<pre>';
var_dump($wp_filter['woocommerce_before_shop_loop']);
echo '</pre>';
到我的檔案 - product.php輸出是這樣的:
array(5) {
[10]=>
array(2) {
["wc_print_notices"]=>
array(2) {
["function"]=>
string(16) "wc_print_notices"
["accepted_args"]=>
int(1)
}
["woocommerce_catalog_ordering"]=>
array(2) {
["function"]=>
string(28) "woocommerce_catalog_ordering"
["accepted_args"]=>
int(1)
}
}
[9]=>
array(1) {
["storefront_sorting_wrapper"]=>
array(2) {
["function"]=>
string(26) "storefront_sorting_wrapper"
["accepted_args"]=>
int(1)
}
}
[20]=>
array(1) {
["woocommerce_result_count"]=>
array(2) {
["function"]=>
string(24) "woocommerce_result_count"
["accepted_args"]=>
int(1)
}
}
[30]=>
array(1) {
["storefront_woocommerce_pagination"]=>
array(2) {
["function"]=>
string(33) "storefront_woocommerce_pagination"
["accepted_args"]=>
int(1)
}
}
[31]=>
array(1) {
["storefront_sorting_wrapper_close"]=>
array(2) {
["function"]=>
string(32) "storefront_sorting_wrapper_close"
["accepted_args"]=>
int(1)
}
}
}
請幫助?
我看到刪除選項的作品爲我好。 http://wildartdevon.co.uk/basket/嘗試隱身模式一會兒! –
我希望它能夠在主頁上設置(設置爲「shop」。)上面的輸出顯示我將var_dunp添加到相關模板。隱身沒有什麼區別......我沒有得到的是,行動清楚地顯示在鉤子上,但不會被刪除。這可能與優先級值有關嗎? – Robin