Skip to main content
added 92 characters in body
Source Link
Johannes Pille
  • 11.1k
  • 3
  • 42
  • 53

tryTry this

get_categories( ', ', '' . _n( 'Category:', 'Categories:', sizeof( get_the_terms( $post->ID, 'product_cat' ) ), 'woocommerce' ) . ' ', '.' ); ?>
<?php
    echo $product->get_categories(
        ', ',
        '<span class="posted_in">' . _n( 'Category:', 'Categories:',
        sizeof( get_the_terms( $post->ID, 'product_cat' ) ),
        'woocommerce' ) . ' ',
        '.</span>'
    );
?>

try this

get_categories( ', ', '' . _n( 'Category:', 'Categories:', sizeof( get_the_terms( $post->ID, 'product_cat' ) ), 'woocommerce' ) . ' ', '.' ); ?>

Try this

<?php
    echo $product->get_categories(
        ', ',
        '<span class="posted_in">' . _n( 'Category:', 'Categories:',
        sizeof( get_the_terms( $post->ID, 'product_cat' ) ),
        'woocommerce' ) . ' ',
        '.</span>'
    );
?>
Source Link

try this

get_categories( ', ', '' . _n( 'Category:', 'Categories:', sizeof( get_the_terms( $post->ID, 'product_cat' ) ), 'woocommerce' ) . ' ', '.' ); ?>