From 781b16dbf622e8fe2f74475f23c5c9d50b485929 Mon Sep 17 00:00:00 2001 From: "Philip M. Hofer (Frumph)" Date: Thu, 24 Dec 2009 15:28:58 -0800 Subject: [PATCH] adjusted the comicpress_post_class to ignore some entries if is_page() Signed-off-by: Philip M. Hofer (Frumph) --- functions/classes.php | 44 ++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/functions/classes.php b/functions/classes.php index 3fd1a40..5901576 100644 --- a/functions/classes.php +++ b/functions/classes.php @@ -111,32 +111,34 @@ function comicpress_post_class($classes = '') { /* Post alt class. */ - $classes[] = 'postonpage-' . ++$post_alt; - - if ( $post_alt % 2 ) - $classes[] = 'odd'; - else - $classes[] = 'even'; - - /* Sticky class (only on home/blog page). */ - if( is_sticky() && is_home() ) - $classes[] = 'sticky'; - - /* Author class. */ - if ( !is_attachment() ) - $classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) ); + if (!is_page()) { + $classes[] = 'postonpage-' . ++$post_alt; + + if ( $post_alt % 2 ) + $classes[] = 'odd'; + else + $classes[] = 'even'; + + /* Sticky class (only on home/blog page). */ + if( is_sticky() && is_home() ) + $classes[] = 'sticky'; + + /* Author class. */ + if ( !is_attachment() ) + $classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) ); + + /* User-created classes. */ + if ( !empty( $class ) ) : + if ( !is_array( $class ) ) + $class = preg_split( '#\s+#', $class ); + $classes = array_merge( $classes, $class ); + endif; + } /* Password-protected posts. */ if ( post_password_required() ) $classes[] = 'protected'; - /* User-created classes. */ - if ( !empty( $class ) ) : - if ( !is_array( $class ) ) - $class = preg_split( '#\s+#', $class ); - $classes = array_merge( $classes, $class ); - endif; - return $classes; }