Remove class from body tag in wordpress

  1. Log in to your WordPress admin dashboard.
  2. Navigate to "Appearance" in the left sidebar and select "Theme Editor."
  3. Locate and click on the "functions.php" file in the right-hand column.
  4. Insert the following code at the end of the "functions.php" file:
function remove_body_class($classes) {
    // Replace 'your-class-to-remove' with the class you want to remove
    $classes = array_diff($classes, array('your-class-to-remove'));
    return $classes;
}
add_filter('body_class', 'remove_body_class');
  1. Replace 'your-class-to-remove' with the actual class you want to remove.
  2. Click the "Update File" button to save the changes.

Note: Editing theme files directly can be risky. Ensure you have a backup of your website before making any changes. If you're not comfortable with code, consider using a child theme or a custom CSS plugin for a safer approach.