In the default Wordpress template, there is this in header.php
.
<body <?php body_class(); ?>>
This echos some useful hooks for CSS and JavaScript. Some example output is
<body class="page page-id-45 page-template page-template-gallery-php">
Is it possible, within the header.php
even, to add my own classes in addition to what is there?
Specifically, I'd like to do a quick strstr
on $_SERVER['HTTP_USER_AGENT']
and add a class if the device is an iDevice.
I figure I could do it with JavaScript, but still being able to know how to add my own classes would be useful nevertheless.