title: render Visual Composer shortcodes onto page
body: <p>I am trying to <code>echo</code> visual composer <code>shortcodes</code> onto a page.</p>
  
  <p>I've tried both methods below, but they don't work:<br /></p>
  
  <p><strong>functions.php:</strong></p>
  
  <p><strong>Method 1</strong></p>
  
  <pre><code>/*
   * add shortcode file
   */
  function include_file($atts) {
      $a = shortcode_atts( array(
          'slug' =&gt; 'NULL',
      ), $atts );
  
      if($slug != 'NULL'){
          ob_start();
          get_template_part($a['slug']);
          return ob_get_clean();
      }
  }
  add_shortcode('include', 'include_file');
  </code></pre>
  
  <p><strong>Method 2</strong></p>
  
  <pre><code>function someshortocode_callback( $atts = array(), $content = null ) {
  
      $output = "[vc_section full_width=\"stretch_row\" css=\".vc_custom_1499155244783{padding-top: 8vh !important;padding-bottom: 5vh !important;background-color: #f7f7f7 !important;}\"][vc_row 0=\"\"][vc_column offset=\"vc_col-lg-offset-3 vc_col-lg-6 vc_col-md-offset-3 vc_col-md-6\"][/vc_column][/vc_row][/vc_section]";
      return $output;
  }
  add_shortcode('someshortocode', 'someshortocode_callback');
  </code></pre>
  
  <p><strong>file_rendering_vc_shortcodes.php:</strong></p>
  
  <p><strong>Method 1</strong></p>
  
  <pre><code>&lt;?php if ( is_plugin_active( 'js_composer/js_composer.php' ) ) {
      wc_print_notice('js_composer plugin ACTIVE', 'notice');
      echo do_shortcode('[include slug="vc_templates/shop-page"]');
  }; ?&gt;
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <ul>
  <li>js_composer plugin ACTIVE</li>
  <li>shortcode is on page with parentheses as is</li>
  </ul>
  
  <p><strong>Method 2</strong></p>
  
  <pre><code>&lt;?php $post = get_post();
  
  if ( $post &amp;&amp; preg_match( '/vc_row/', $post-&gt;post_content ) ) {
  // Visual composer works on current page/post
      wc_print_notice('VC ON', 'notice');
      echo add_shortcode('someshortocode', 'someshortocode_callback');
  } else {
      wc_print_notice('VC OFF', 'notice');
      //echo do_shortcode('[include slug="vc_templates/shop-page"]');
  }; ?&gt;
  </code></pre>
  
  <p><strong>Result</strong><br /></p>
  
  <ul>
  <li>VC OFF (obviously, since the <code>vc_row</code> in shortcode is not there)</li>
  <li>shortcode is NOT on page</li>
  </ul>
  
  <p><strong>shop-page.php</strong></p>
  
  <pre><code>&lt;?php
  /**
  Template Name:  Shop Page in theme
  Preview Image:  #
  Descriptions:   #
   * [vc_row][vc_column][/vc_column][/vc_row]
   */
  ?&gt;
  [vc_section full_width="stretch_row" css=".vc_custom_1499155244783{padding-top: 8vh !important;padding-bottom: 5vh !important;background-color: #f7f7f7 !important;}"][vc_row 0=""][vc_column offset="vc_col-lg-offset-3 vc_col-lg-6 vc_col-md-offset-3 vc_col-md-6"][/vc_column][/vc_row][/vc_section]
  </code></pre>
  
  <p>Is it possible to render <code>vc shortcodes</code> on page, and if so, how is it done?</p>