Created
November 18, 2014 19:24
-
-
Save lmartins/c0ca304e235c952c5e44 to your computer and use it in GitHub Desktop.
Show categories associated to each product in archives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Mostra as categorias associadas ao tema | |
*/ | |
add_action( 'woocommerce_after_shop_loop_item_title', 'mw_archive_add_theme_category', 5 ); | |
function mw_archive_add_theme_category() | |
{ | |
global $product; | |
$out = '<div class="product-categories">'; | |
$out .= strip_tags( $product->get_categories() ); | |
$out .= '</div>'; | |
echo $out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment