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 freelancers are bidding on average zł73 for this job
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 更多