Support » Plugin: WooCommerce » Product category list on product pages

Viewing 8 replies - 1 through 8 (of 8 total)
  • You can override the template used.

    copy the /wp-content/plugins/woocommerce/templates/single-product/meta.php
    to a new folder in your theme

    /wp-content/themes/my-theme-name/woocommerce/single-product/meta.php

    Edit that file to exclude the categories, which should be lines 23 and 24.

    Woocommerce will use the file in your theme instead of the template file in the plugin.

    Thread Starter Netflora

    (@netflora)

    Ok cool, I’ll give that a go, cheers!

    Thread Starter Netflora

    (@netflora)

    Oh and if I break something I can just delete the new file from /wp-content/themes/my-theme-name/woocommerce/single-product/meta.php

    and it will revert to the original?

    Yes it will.

    Thread Starter Netflora

    (@netflora)

    Hi, I removed the following lines and uploaded the file to the new directory in my theme woocommerce/single-product/

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

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    But no go?

    Charlie

    Thread Starter Netflora

    (@netflora)

    Any ideas anyone?

    Add something to the file to “see” if its executing it.

    Make sure that the new template file is being seen.

    Thread Starter Netflora

    (@netflora)

    Could it be a cache issue?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Product category list on product pages’ is closed to new replies.