Add the first snippet to the functions.php of your wordpress theme then add the second snippet within the body tag of your wordpress header.php template. <body <? body_class(); ?>>This snippet will add class based on the users operating system “windows, mac, linux” and also the browser including iphone and if Internet explorer the specific version.

About wpsnipp

WPSNIPP Was founded in 2010 by Kevin Chard and is a free resource dedicated to WordPress covering a wide range of topics. With over 640+ WordPress snippets, we also have tutorials, plugins, gallery and deals to enhance all aspects of your WordPress theme or blog.