Tagged: archive, description, enfold, settings, shortcode, woocommerce
-
AuthorPosts
-
November 20, 2024 at 12:37 pm #1471738
I have WooCommerce installed and use the shop description from the settings within the theme options. I need to place a [shortcode] inside the description but it is not being executed.
For the product categories (they share the same layout as the shop description) I use this code inside my functions.php to make shortcodes work:
add_filter( 'product_cat_description', 'do_shortcode' );What is the correct filter to enable shortcodes for the shop description as well? Any help is appreciated. Thanks!
November 24, 2024 at 3:59 pm #1472070Hey Daniel,
I didn’t find a filter for this, but I asked the team for advice. Thank you for your patience.Best regards,
MikeNovember 25, 2024 at 9:08 am #1472110Hi Mike, thank you for the short response. I still need to enable shortcodes in the shop description. Any idea on when you will have a solution for me?
November 25, 2024 at 9:40 am #1472115Hey,
Currently, there isn’t a filter for this. I’ll submit this as a feature request.
For now, please go to the enfold/config-woocommerce/ folder, open the config.php file, and find the following line:
$output .= "<{$desc_tag} class='av-banner-description'>{$description}</{$desc_tag}>";and change it to the following:
$output .= "<{$desc_tag} class='av-banner-description'>" . do_shortcode($description) . "</{$desc_tag}>";Best regards,
YigitNovember 26, 2024 at 9:45 am #1472233Hi Yigit, thank you for the workaround! How is the roadmap for integrating the filter for this? Will anyone post here once it is shipped or will I find it in the changelog? And: Can I make your suggested change in a child theme?
November 26, 2024 at 10:23 am #1472236Hey,
This exact solution will be included in the upcoming version so you can apply it to the parent theme for now.
You can find this noted in the Upcoming Fixes thread: https://kriesi.at/support/topic/enfold-upcoming-fixes/
Regards,
YigitNovember 26, 2024 at 10:29 am #1472238Nice! Thanks a lot. You may close this.
All the best,
Daniel -
AuthorPosts
- The topic ‘Shortcode in Shop Description’ is closed to new replies.
