Category Archives: Wordpress

session

https://code.tutsplus.com/tutorials/wordpress-for-web-app-development-sessions–wp-34228

Woocommerce

1) Lấy ra danh sách các category

$args = array(
‘taxonomy’ => ‘product_cat’,
‘orderby’ => ‘ID’,
‘order’ => ‘ASC’,
‘hierarchical’ => 1,
‘hide_empty’ => 0
);

$all_categories = get_categories( $args );

Lấy link của 1 category : <?php echo get_term_link($c->slug, ‘product_cat’);?>

Copyright © 2017. Powered by WordPress & Romangie Theme.