This code enables you to add 1 single or multiple comma delimited body classes on your edit post page screen which will be removed from your body classes on specific pages and posts only.
You can use this solution to remove body classes for :
- any theme
- any template which adds multiple body classes you want removed
- any plugin which adds body classes
- any page builder like Elementor which adds multiple body classes
The code adds a text field on all your edit post and edit page screens which you can use to remove multiple body classes like this :
Tested using the Genesis Sample child theme by StudioPress however will work in any WordPress theme with a small teak of the PHP code.
There’s 2 steps :
Step 1 : Upload the file named form.php to your child theme folder.
Step 2 : Copy & paste the PHP code to the end of your child themes functions file.
You must be logged in to post a comment.