php - how to remove links and show text of categories in woocoomerce product page -


i need on 1 because on single product page in woocommerce, categories display link.

could possible remove link , text shows up

im using code of moment

$size = sizeof( get_the_terms( $post->id, 'product_cat' ) ); echo '<li>'; echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'category:', 'categories:', $size, 'woocommerce' ) . ' ', '.</span>' ); echo '</li>'; 

thanks

you can like;

$categories = get_the_terms( $post->id, 'product_cat' ); if ( sizeof( $categories ) > 0 ) {     echo '<ul>';     foreach ($categories $cat) {         echo '<li>' . $cat->name . '</li>';      }     echo '</ul>'; } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -