CPT With Texonimy

/** custom post type * */ // Our custom post type function /* * Creating a function to create our CPT */ /* function custom_post_type() { // Set UI labels for Custom Post Type $labels = array( ‘name’ => _x(‘Products’, ‘Post Type General Name’, ‘twentythirteen’), ‘singular_name’ => _x(‘Product’, ‘Post Type Singular Name’, ‘twentythirteen’), ‘menu_name’ =>…

how to show Woo Commerce Categories

$taxonomy = ‘product_cat’; $orderby = ‘name’; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // 1 for yes, 0 for no $hierarchical = 1; // 1 for yes, 0 for no $title = ”; $empty = 0; $args = array( ‘taxonomy’ => $taxonomy, ‘orderby’ => $orderby, ‘show_count’ => $show_count, ‘pad_counts’…

How to Show Woo Commerce Categories & There Products

$args = array( ‘number’ => $number, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘hide_empty’ => $hide_empty, ‘include’ => $ids ); $product_categories = get_terms( ‘product_cat’, $args ); $count = count($product_categories); if ( $count > 0 ){ foreach ( $product_categories as $product_category ) { echo ‘ ‘; echo ‘ ‘ . $product_category->name . ‘ ‘; $args = array(…