/ Published in: PHP
Function to add custom body class in th Thesis theme for WordPress...Thanks to @girliegeek!
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Add my-custom-class to body tag function custom_body_class($classes) { $classes[] = 'my-custom-class'; return $classes; } add_filter('thesis_body_classes', 'custom_body_class'); // To single pages only function custom_body_class($classes) { if (is_single()) { $classes[] = 'my-custom-class'; return $classes; } } add_filter('thesis_body_classes', 'custom_body_class');
URL: http://codesnippets.joyent.com/posts/show/2304