Skip to content

Instantly share code, notes, and snippets.

View maxchirkov's full-sized avatar

Max maxchirkov

  • Phoenix, Arizona
View GitHub Profile
bitfade / gist:4555047
Last active January 21, 2022 03:06
WordPress - Remove empty p tags for custom shortcodes
View gist:4555047
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