Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save celticwebdesign/32b451bf73608bddea4ad39bc982131a to your computer and use it in GitHub Desktop.
Save celticwebdesign/32b451bf73608bddea4ad39bc982131a to your computer and use it in GitHub Desktop.
Allows display of Visual Composer on different page.
$post_id = get_field('above_footer');
$vcM = Vc_Manager::getInstance();
$vc = $vcM->vc();
$vc->addShortcodesCustomCss( $post_id );
$post = get_post($post_id, OBJECT);
$content = $post->post_content;
$content = apply_filters('wpautop', $content);
$content = str_replace(']]>', ']]>', $content);
setup_postdata($post);
WPBMap::addAllMappedShortcodes();
echo apply_filters('the_content', $post->post_content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment