From 910f782934beaf577ac83b16580979e2a480ee31 Mon Sep 17 00:00:00 2001 From: koenemann Date: Mon, 15 Aug 2016 15:03:06 +0200 Subject: [PATCH] removing body class "tag" from tag page to avoid BS styling issues with .tag class --- inc/extras.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/inc/extras.php b/inc/extras.php index 5e7aecf..c44c035 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -24,3 +24,16 @@ function understrap_body_classes( $classes ) { return $classes; } add_filter( 'body_class', 'understrap_body_classes' ); + +// Removes tag class from the body_class array to avoid Bootstrap markup styling issues. + +add_filter( 'body_class', 'adjust_body_class' ); +function adjust_body_class( $classes ) { + + foreach ( $classes as $key => $value ) { + if ( $value == 'tag' ) unset( $classes[ $key ] ); + } + + return $classes; + +}