This topic has 2 replies, 2 voices, and was last updated 9 minutes ago ago by Rose Tyler
Hello, good afternoon, how are you?
I have added some text to my product single page from the theme’s function.php. The problem is that by adding it with code, it does not allow me to translate this text on the pages in other languages. The code I used is this:
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_custom_content', 12 );
function woocommerce_template_custom_content(){
echo "<h4>Handcrafted ✂︎</h4>";
}
What I want to do is add, instead of this text, a call to a static block that I have already created, and place it in this same position so I can translate it.
I need help on how I can create the code in function.php to add the static block that I want in this same place of the text created in the code that I mentioned.
Hello, Tiffany,
Thank you for reaching out to us with your query. We understand that you would like to replace the static text in your product single page with a static block.
Please check examples of using do_shortcode
– https://www.8theme.com/search/?bbp_search=do_shortcode&bbp_forum_id=128990
Best regards,
8Theme’s Team
You must be logged in to reply to this topic.Log in/Sign up