Last active
August 29, 2015 14:09
-
-
Save lukaspawlik/2bb8d3e0422ab3d5cd82 to your computer and use it in GitHub Desktop.
Fix for conflict with Visual Composer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Lukas Pawlik <[email protected]> | |
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