1

I have created a basic template in Visual Composer which mostly defines a layout of the page. Now I can select this template from "My templates" in VC.

However, what I really need is to call the template from a single_page.php file. Ensuring that end users can't change the layout via VC.

Is there any way how to do so? Via some VC API function or shortcode? Something like [vc_template name="my_custom_layout"]?

Thanks for any help, Jakub

Jakub Kašpar
  • 285
  • 5
  • 6
  • 16

1 Answers1

0

Have you tried

echo do_shortcode( "[vc_template name='my_custom_layout']", false );
vagelis
  • 479
  • 2
  • 12
  • Unfortunately, that is not working... it seems that VC API syntax for template shortcode is not vc_template. – Jakub Kašpar Jul 29 '17 at 08:49
  • @JakubKašpar see this helps you. https://stackoverflow.com/questions/39525669/how-to-get-visual-composer-page-through-rest-api – vagelis Jul 29 '17 at 10:07