Body Class is a PHP script to add class styles to the body tag of your page based on the current page state. It is based on the same principles as the WordPress body class but has been created specifically for Pulse. It easily allows you to target and style specific pages or blog posts within the CMS.
The script will output class styles to the page based on the environment the page is viewed in.
At present the script will add the following class styles to the page;
Below is an example showing the class styles for a page after the script has been applied to the Pulse template.
<body class="work page logged-in page-template-default">
With these styles applied to the body tag it is very easy to style your Pulse site depending on where the user is and what sort of page they are looking at. You could, for example, style the page differently if the admin is currently logged into Pulse or adjust the layout of the template specifically for single posts.
For example;
body.logged-in { outline:1px solid #f00 }
Download the PHP script and FTP the file into your Pulse install at inc > tags.
Open up your template and add the following code to the top of the file (anywhere before the body tag will do).
<?php include_once("inc/tags/body-class.php"); ?>
Lastly locate the body tag in your template and edit it so it looks like the one below;
<body<?php body_class(''); ?>>
The body_class function accepts two parameters;
<body class="<?php body_class('foo bar baz',true); ?>">
If you are looking for a custom plug-in, template or gallery for Pulse then get in touch as I'm sure we can help.