Advertisements

twentyeleven_body_classes

Definition:
function twentyeleven_body_classes( $classes ) {}

Adds two classes to the array of body classes.
The first is if the site has only had one author with published posts. The second is if a singular post being displayed

Parameters

  • $classes

Source code

function twentyeleven_body_classes( $classes ) {



	if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )

		$classes[] = 'single-author';



	if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )

		$classes[] = 'singular';



	return $classes;

}

14715

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: