Add another line (subtitle) under product title
-
Hi,
I wanted to add another line under the title on single product page (woocommerce) with use of custom field.
I found a way to do it on default theme, but for some odd reason on Astra new line is added NOT below (as expected), but above the title.
I was using following code:
function add_product_subtitle_under_the_title() { global $product; $product_id = $product->get_id(); // The product ID if( get_field('podtytul_plakatu', $product_id) ): echo '<h2 class="product_secondary_title">'; echo the_field('podtytul_plakatu', $product_id); echo '</h2>'; endif; } add_action( 'woocommerce_single_product_summary', 'add_product_subtitle_under_the_title', 10 );
Any idea why is that so, or is there specific astra hook that I should use instead of woo one?
Cheers,
Tom
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add another line (subtitle) under product title’ is closed to new replies.