admin管理员组文章数量:1415460
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!
本文标签: shortcodeRun visual composer code in php page
版权声明:本文标题:shortcode - Run visual composer code in php page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745186060a2646691.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论