Syntax Highlighting in WordPress

After I tried out a few of the available plugins for syntax highlighting, I ended up with a DIY solution that I’m really happy with. 

The main part of it is PrismJS which is an excellent JS/CSS solution for the job. 

I was trying to avoid anything that’s not out-of-the-box or requires custom shortcodes and PrismJS not only looks great, it also is very simple to use with the Classic Editor as well as the current version of Gutenberg.

Continue reading “Syntax Highlighting in WordPress”

Remove WPBakery Page Builder (formerly Visual Composer) shortcodes from the Excerpt

I’ve had this issue on a site where we’re using WPBakery Page Builder and its built-in “Grid Builder” for showing a selection of pages. Within the Grid Builder, we’re outputting the page excerpt. 

This means that WordPress shows certain shortcodes (or some variations of them) within the excerpt:

Continue reading “Remove WPBakery Page Builder (formerly Visual Composer) shortcodes from the Excerpt”