Created
February 4, 2022 14:05
-
-
Save wpflames/3dcfd6ac19b508a034c60d334317c7c8 to your computer and use it in GitHub Desktop.
Display WooCommerce Product Category Subtitle
This file contains hidden or 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
| // ========================================================================= | |
| // 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