Just a footnote to this, which could help other people searching the topics, we can create a Page Template as described above, then in the page code look for the Post Class.
Lets say we wanted a page template for ‘Our Staff’, or a page to dispaly a custom content loop, in a custom layout, we open page.php and save this as template-staff.php
Open the template-staff.php file and add our template code:
<?php
/*
Template Name: Our Staff
*/
Now we find the Body Class, in twenty eleven it would be this line
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
We can add a custom class to this page template.
<article id="post-<?php the_ID(); ?>" <?php post_class('our-staff'); ?>>
Now our-staff will be added as a class for our page template!
In style.css we can add our styles, something like.
.our-staff {
background: #e0e0e0;
border solid 1px #ccc;
}
Apply the Template to our page, add the content and publish.
If we can code a little and we are using custom post types or a category for our staff, for the content or loop, in twenty eleven we would create a file content-staff.php with the custom loop, then in the page template find.
<?php get_template_part( 'content', 'page' ); ?>
Change this to:
<?php get_template_part( 'content', 'staff' ); ?>
That’s it!
HTH
David