Meta Box
Support Forum
Support › MB Views › Shortcode in custom written template file
Is there a way to insert a shortcode into a custom written php file? I believed you should be able to use <?php echo do_shortcode('[restricted]'); ?>
but because MB quotes the name [mbv name="test1"] it causes an error on the page.
Hi,
You can insert the View shortcode to the PHP code as well.
echo do_shortcode('[mbv name="my-shortcode"]');
Remember to select the View type: Shortcode, screenshot https://imgur.com/6LXzgym