I have a very simple job.
This script displays in my shop categories to which the product belongs.:
global $post, $product;
$cat_count = sizeof( get_the_terms( $post->ID, 'product_cat' ) ); ?>
<div class="cat_title"><?php echo $product->get_categories( ', ', '<span class="posted_in">' . _n( '', '', $cat_count, 'woocommerce' ) . ' ', '</span>' );?></div>
I want to list the name ONLY parent category, without sub-categories.
Currently, the script displays a parent category and its subcategories. Must display only parent category.
15 威客就此工作平均出价 zł73
Hi Gone throug you requirement. I want you check my profile and reviews of my customers. Hope you will be one of them soon. We belive in total professionalism. Waiting for your reply. Subrata
Hello There, Hope you're doing well. We are handling the server with 6+ years of excellence in hosting business with various clients and our services are, [url removed, login to view] Troubleshoot [url removed, login to view] Configurtion [url removed, login to view] P 更多