Hi. How can I add PHP codes in shortcode?
For example, I want to add a script with “fetch”
fetch('<?php echo get_rest_url(); ?>wordpress/v1/get/subscription-product', { method: 'GET', })...
Note: I am currently developing on local, so I cannot provide my website yet.
Hi Miko,
Thanks for using Shortcoder.
Shortcoder supports only HTML/CSS/JS as content.
FAQ
I would suggest plugins like below for your purpose.
Insert PHP Code Snippet
Thanks, Aakash
Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter
By using this website, you agree to our Terms Ok