Replies: 0
Hi there
This has been discussed before, however it’s not working for me. As the shortcode seems to be a mix of regular and open-close shortcode. Or a combination of nested shortcodes.
Here is the instructions from the codex
// Use shortcode in a PHP file (outside the post editor).
echo do_shortcode( ” );
// In case there is opening and closing shortcode.
echo do_shortcode( ‘[iscorrect]’ . $text_to_be_wrapped_in_shortcode . ‘[/iscorrect]’ );
This is the shortcode I would like to display in my php template
[mk_page_section bg_stretch=”true” full_width=”true” padding_top=”0″ padding_bottom=”0″ sidebar=”sidebar-1″][vc_column][mk_header hover_styles=”5″ logo=”false”][/vc_column][/mk_page_section]
What I am trying to achieve is display my main navigation on a webinar page that doesn’t use my themes header or footer.
Is mit possible to use it like this?
<?php echo do_shortcode(‘[mk_page_section bg_stretch=”true” full_width=”true” padding_top=”0″ padding_bottom=”0″ sidebar=”sidebar-1″][vc_column][mk_header hover_styles=”5″ logo=”false”][/vc_column][/mk_page_section]’); ?>
Or must I follow this option as displayed with example button:
echo Su_Shortcodes::button(
// First argument is array with shortcode attributes
array(
‘style’ => ‘flat’,
‘background’ => ‘#0099ff’
),
// Second argument is a shortcode content (between opening and closing tags)
‘Click me’
);
// Equal to [su_button style=”flat” background=”#0099ff”] Click me [/su_button]
Or must it be a combination? totally lost here…
Why is the do_shortcode not working?
Thanks to anyone who can help.