From 545b3514b3f50c1b112c843e1f6fb702864bed71 Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Tue, 7 Feb 2012 02:52:04 +0000 Subject: [PATCH] _s: If the tweaks file is in use hide the author of posts everywhere except singular -- where it's useful to see the author if that's your entry point to a single author blog -- unless it's a group blog in which case just show the author name everywhere. Doing this all with just CSS so it's easily reversible with child themes of themes built from _s git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8876 d957f892-c61d-0410-b221-f235e6eecf30 --- inc/tweaks.php | 4 ++++ style.css | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/inc/tweaks.php b/inc/tweaks.php index 1900ef39..964ac212 100644 --- a/inc/tweaks.php +++ b/inc/tweaks.php @@ -25,6 +25,10 @@ add_filter( 'wp_page_menu_args', '_s_page_menu_args' ); * @since _s 1.0 */ function _s_body_classes( $classes ) { + // If this isn't a post or a page we'll add the convenient .indexed class + if ( ! is_singular() ) { + $classes[] = 'indexed'; + } // Adds a class of single-author to blogs with only 1 published author if ( is_multi_author() ) { $classes[] = 'group-blog'; diff --git a/style.css b/style.css index b6f354f2..efb98567 100644 --- a/style.css +++ b/style.css @@ -402,6 +402,12 @@ a:active { .hentry { margin: 0 0 1.5em; } +.indexed .byline { + display: none; +} +.group-blog .byline { + display: inline; +} .entry-content, .entry-summary { margin: 1.5em 0 0;