KrisChase.com

Remove Visual Composer from WordPress Excerpt

Posted in Web Development on 06.10.2015 by @chasebadkids

If you’ve ever been in a situation where you’re using Visual Composer within a site and you need to pull in an excerpt in a way that doesn’t include any shortcodes you can use the below functions to make that happen.

All you need to do is drop the following code into your functions.php file:

The Code for removing Visual Composer

After you insert the previous code into your functions.php file, you can call the function wherever it’s needed using the following:

Note:

You can also pass in an argument to the function which will allow you to modify the length of your excerpt while excluding those Visual Composer shortcodes.

Is there any way you see this function for removing Visual Composer Shortcodes from WordPress could be improved? If so, shoot me an email and I’ll work on getting it added!

Menu