Skip to content

Instantly share code, notes, and snippets.

@bitfade
bitfade / gist:4555047
Last active Sep 25, 2019
WordPress - Remove empty p tags for custom shortcodes
View gist:4555047
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag
You can’t perform that action at this time.