First let me say a big thank you for creating one of the most professional and useful WordPress plugins on the planet.
Just wondering if you could clarify something for me:
I created a shortcode with Shortcoder and put it within an ACF field. By default, shortcodes cannot run within ACF fields, it just displays as text.
After looking for an easy solution to add via functions.php, I found that this works perfectly:
Can you please let me know if this is the way you would do it? Is it safe to do it this way? I need to do it via functions.php and not edit any template files.
Any thoughts are appreciated. Thanks.
Thanks for using Shortcoder. Happy that you like it.
Shortcodes are executed in most places by default by WordPress using the function do_shortcode
But sometimes, certain fields/text of other plugins do not evaluate the shortcode. We must use the same do_shortcode function to do that.
In your case yes, the code you have used is correct.
Excellent, thank you very much Aakash. Just wanted to be sure it didn’t open up any security holes by enabling that….Thanks again.
Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter