Im trying to add a plugin shortcode into an HTML document so that when you clickthe "Music" icon on the site a popup appears with the plugin widget in it.
This is the shortcode in the HTML file (using the plugin "Custom CSS & JS), ive wrapped it in a div, it works with an iframe but I cant get a shortcode to appear.
[lbg_audio3_html5 settings_id='1']
This is the page - /
Im trying to add a plugin shortcode into an HTML document so that when you clickthe "Music" icon on the site a popup appears with the plugin widget in it.
This is the shortcode in the HTML file (using the plugin "Custom CSS & JS), ive wrapped it in a div, it works with an iframe but I cant get a shortcode to appear.
[lbg_audio3_html5 settings_id='1']
This is the page - https://ellislanding.garywestjr/
Share Improve this question asked Apr 23, 2020 at 11:26 gjjrgjjr 1134 bronze badges 01 Answer
Reset to default 0Shortcodes work because WordPress is set up to parse them when it outputs content. Including a shortcode in any plain HTML file won't work because there's nothing but the web browser to parse the code.
It's possible to include some WP methods - such as in this question What is the correct way to use WordPress functions outside WordPress files? - but you'd likely be better off just taking the full HTML the shortcode outputs and pasting that into your file, rather than trying to bootstrap WP into HTML.