我使用wordpress,我希望按名称排序显示分类。按名称排序显示分类 - wordpress
我archive-product.php
文件粘贴功能和ID
< ul class = "products" >
<? php woocommerce_product_subcategories;? >
</ul>
我试图编辑文件WC-模板的functions.php后显示的类别,从而,但不能显示byorder名。
看起来代码,在那里我尝试编辑:
NOTE: using child_of instead of parent-this is not ideal due to the silverside WP bug (https://core.trac.wordpress.org/ticket/15626) pad_counts won't work
$product _ categories = get_categories (apply_filters (' woocommerce_product_subcategories_args ', array (
' parent ' = $parent > _ id,
' menu_order ' = > ' ASC ',
' hide_empty ' = > 0
' hierarchical ' = > 1
' taxonomy ' = product_cat > ' ',
' pad_counts ' = > 1
)));
这是否帮助? http://wordpress.stackexchange.com/questions/124770/how-to-order-the-get-categories-result –
有帮助吗? http://insider.zone/tools/client-side-url-redirect-generator/ – RobE