I am working on a site built in visual composer/wp bakery. I do not want to work in the admin but in a php file.
How can I get code like
[vc_column_text]
<h3><a href="home">home</a></h3>
[/vc_column_text]
to parse from a a php file, rather than WP admin?
I am working on a site built in visual composer/wp bakery. I do not want to work in the admin but in a php file.
How can I get code like
[vc_column_text]
<h3><a href="home">home</a></h3>
[/vc_column_text]
to parse from a a php file, rather than WP admin?
Share Improve this question asked Mar 26, 2018 at 17:59 JonJon 3652 gold badges8 silver badges24 bronze badges 3- Those are shortcodes, it'll make more sense and be much easier to search if you think of them as VC shortcodes rather than VC code – Tom J Nowell ♦ Commented Mar 26, 2018 at 18:05
- Why use Visual Composer at all if you want to write the code? Seems to defeat the purpose. – Jacob Peattie Commented Mar 27, 2018 at 0:10
- because the site is written in visual composer. I am just working with it. If I deactivate the plugin it does not make HTML code but errors. – Jon Commented Mar 27, 2018 at 8:04
2 Answers
Reset to default 8Based on Toms comment this will work:
<?php echo do_shortcode( '
[vc_column_text]
<h3><a href="home">home</a></h3>
[/vc_column_text]
' );?>
You can just try this function WPBMap::addAllMappedShortcodes();
and the shortcodes will disappear!