How to remove unwanted WordPress classes

This snippet will let you create a white-list of terms to include in body_class. This is a great way to filter out many of the unwanted WordPress css classes added.

Instructions
Add this to your functions.php file.

Snippet Info

Tested with Wordpress v. 4.7.3
Last Modified: 04.05.2017
Last Reviewed: 04.05.2017
Review Status: Needs Review

How to remove unwanted WordPress classes
4.6 (91.43%) 14 votes
Please report broken snippets.
Report Broken Snippet