Product tag second description + create shortcode could be added in Elementor
-
Hello,
As I couldn’t find any answer to my request on several websites, I hope to get help here to solve my problem. In fact, I would like to know how I can creat a shortcode to display the second description of product tag, which could then be added in page builder. I am using now Elementor Pro.
I found a solution for add the second description of product tag that works perfectly (here : https://businessbloomer.com/woocommerce-add-a-second-content-box-product-category-pages/) with changing product_cat_add_form_fields to product_tag_add_form_fields in the code.
But it is fixed below the product listings. Would be good if it had a [shortcode] and it could then be added in Elementor(on single Product page). I try to change the 4th function but it still not works.
Here is the 4th function
// 4. Display shortcode add_shortcode( 'custom_display_tag_seconddesc', 'custom_display_tag_seconddesc' ); function custom_display_tag_seconddesc() { if ( is_product_taxonomy() ) { $term = get_queried_object(); if ( $term && ! empty( get_woocommerce_term_meta( $term->term_id, 'seconddesc', true ) ) ) { return '<div class="term-description">' . wc_format_content( htmlspecialchars_decode( get_woocommerce_term_meta( $term->term_id, 'seconddesc', true ) ) ) . '</div>'; } } };
- This topic was modified 3 years ago by .
- This topic was modified 3 years ago by .
- This topic was modified 3 years ago by .
The page I need help with: [log in to see the link]
- The topic ‘Product tag second description + create shortcode could be added in Elementor’ is closed to new replies.