Skip to content

Instantly share code, notes, and snippets.

@wpflames
Created February 4, 2022 14:05
Show Gist options
  • Select an option

  • Save wpflames/3dcfd6ac19b508a034c60d334317c7c8 to your computer and use it in GitHub Desktop.

Select an option

Save wpflames/3dcfd6ac19b508a034c60d334317c7c8 to your computer and use it in GitHub Desktop.
Display WooCommerce Product Category Subtitle
// =========================================================================
// DISPLAY PRODUCT CATEGORY SUBTITLE
// =========================================================================
function add_product_cat_subtitle(){
$term_id = get_queried_object()->term_id;
$post_id = 'product_cat_'.$term_id;
$subtitle = get_field('alcim', $post_id); //
echo $subtitle;
}
add_action( 'woocommerce_before_main_content', 'add_product_cat_subtitle', 25);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment