adjusted the comicpress_post_class to ignore some entries if is_page()

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-12-24 15:28:58 -08:00
parent 24ccd0ab84
commit 781b16dbf6
1 changed files with 23 additions and 21 deletions

View File

@ -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;
}