<?php
// 获取全站分类名称和url(分类中必须含有文章,否则不显示)
$args=array(
‘orderby’ => ‘ID’,
‘exclude’=> ‘1, 17’, //排除的分类ID,以英文逗号分隔开
‘order’ => ‘ASC’
);
$categories=get_categories($args);
foreach($categories as $category){
echo ‘<a href=”‘ . get_category_link( $category->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $category->name ) . ‘” ‘ . ‘>’ . $category->name.'</a>’;
}
?>
如何移除WooCommerce产品分类链接中的product-category和product
为何要移除product-category和product? 我们在优化网站的时候,链接的优化也非常的重要。对与谷歌SEO来说,链接越短越好,外贸独立站最最常用