Last active
August 29, 2015 14:07
-
-
Save Deaner666/4c2eb14cd5f1153b3b64 to your computer and use it in GitHub Desktop.
Display custom meta on WooCommerce product_cat archive page
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
<?php | |
// Display details on product category archive pages | |
add_action( 'woocommerce_after_shop_loop', 'wpm_product_cat_archive_add_meta' ); | |
function wpm_product_cat_archive_add_meta() { | |
$t_id = get_queried_object()->term_id; | |
$term_meta = get_option( "taxonomy_$t_id" ); | |
$term_meta_content = $term_meta['custom_term_meta']; | |
if ( $term_meta_content != '' ) { | |
echo '<div class="woo-sc-box normal rounded full">'; | |
echo apply_filters( 'the_content', $term_meta_content ); | |
echo '</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment