This topic has 3 replies, 3 voices, and was last updated 1 months, 1 weeks ago ago by Andrew Mitchell
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
Dear Tiffany,
Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?
Click here to share your insights: https://themeforest.net/downloads
Your support fuels our journey, and we appreciate it more than words can express.
Best Regards,
The 8Theme Team
The issue related to '‘add a static block as hook in the product single page’' has been successfully resolved, and the topic is now closed for further responses