daily pastebin goal
78%
SHARE
TWEET

WooCommerce - Show tag description

lorro Jan 10th, 2017 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // WooCommerce - Show tag description for themes that don't support this
  3.   // code goes in functions.php for your child theme
  4.   add_action ( 'woocommerce_archive_description', 'show_tag_description', 20 );
  5.    function show_tag_description() {
  6.      if ( is_product_tag() ) {
  7.        $term_id = get_queried_object()->term_id;
  8.        echo tag_description( $term_id );
  9.     }
  10.   }
RAW Paste Data
Top