Skip to content

Instantly share code, notes, and snippets.

@lukaspawlik
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaspawlik/2bb8d3e0422ab3d5cd82 to your computer and use it in GitHub Desktop.
Save lukaspawlik/2bb8d3e0422ab3d5cd82 to your computer and use it in GitHub Desktop.
Fix for conflict with Visual Composer
/*
Author: Lukas Pawlik <lukas@time.ly>
Please put this code in your theme functions.php file.
*/
add_filter( 'the_excerpt', '__ai1ec_vcomposer_fix', 0, 1);
function __ai1ec_vcomposer_fix( $content ) {
if ( ! empty( $content ) ) {
return $content;
}
global $post;
if ( strpos( $post->post_content, '[ai1ec' ) !== false ) {
return ' ';
}
return $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment