.post .post-comic .post-page and .post-blog are the class wrappers now, .post will always appear unless on is_page()
Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
parent
fb985a66e1
commit
97f1f66b2d
|
@ -99,35 +99,33 @@ function comicpress_post_class($classes = '') {
|
||||||
$classes[] = 'uentry';
|
$classes[] = 'uentry';
|
||||||
|
|
||||||
/* if a comic category */
|
/* if a comic category */
|
||||||
if (in_comic_category()) $classes[] = 'comicpost';
|
if (in_comic_category()) $classes[] = 'post-comic';
|
||||||
if (is_page()) $classes[] = 'pagepost';
|
if (is_page()) $classes[] = 'post-page';
|
||||||
if (!in_comic_category() && !is_page()) $classes[] = 'blogpost';
|
if (!in_comic_category() && !is_page()) $classes[] = 'post-blog';
|
||||||
|
|
||||||
|
|
||||||
/* Post alt class. */
|
/* Post alt class. */
|
||||||
if (!is_page()) {
|
$classes[] = 'postonpage-' . ++$post_alt;
|
||||||
$classes[] = 'postonpage-' . ++$post_alt;
|
|
||||||
|
if ( $post_alt % 2 )
|
||||||
if ( $post_alt % 2 )
|
$classes[] = 'odd';
|
||||||
$classes[] = 'odd';
|
else
|
||||||
else
|
$classes[] = 'even';
|
||||||
$classes[] = 'even';
|
|
||||||
|
/* Sticky class (only on home/blog page). */
|
||||||
/* Sticky class (only on home/blog page). */
|
if( is_sticky() && is_home() )
|
||||||
if( is_sticky() && is_home() )
|
$classes[] = 'sticky';
|
||||||
$classes[] = 'sticky';
|
|
||||||
|
/* Author class. */
|
||||||
/* Author class. */
|
if ( !is_attachment() )
|
||||||
if ( !is_attachment() )
|
$classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
|
||||||
$classes[] = 'post-author-' . sanitize_html_class( get_the_author_meta( 'user_nicename' ), get_the_author_meta( 'ID' ) );
|
|
||||||
|
/* User-created classes. */
|
||||||
/* User-created classes. */
|
if ( !empty( $class ) ) :
|
||||||
if ( !empty( $class ) ) :
|
if ( !is_array( $class ) )
|
||||||
if ( !is_array( $class ) )
|
$class = preg_split( '#\s+#', $class );
|
||||||
$class = preg_split( '#\s+#', $class );
|
$classes = array_merge( $classes, $class );
|
||||||
$classes = array_merge( $classes, $class );
|
endif;
|
||||||
endif;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Password-protected posts. */
|
/* Password-protected posts. */
|
||||||
if ( post_password_required() )
|
if ( post_password_required() )
|
||||||
|
|
|
@ -141,9 +141,9 @@ function comicpress_display_the_content() {
|
||||||
|
|
||||||
function comicpress_display_post() {
|
function comicpress_display_post() {
|
||||||
global $post, $wp_query; ?>
|
global $post, $wp_query; ?>
|
||||||
|
<?php comicpress_display_blog_navigation(); ?>
|
||||||
|
<?php comicpress_display_comic_navigation(); ?>
|
||||||
<div <?php post_class(); ?>>
|
<div <?php post_class(); ?>>
|
||||||
<?php comicpress_display_blog_navigation(); ?>
|
|
||||||
<?php comicpress_display_comic_navigation(); ?>
|
|
||||||
<?php comicpress_display_post_thumbnail(); ?>
|
<?php comicpress_display_post_thumbnail(); ?>
|
||||||
<div class="post-head"></div>
|
<div class="post-head"></div>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
@ -169,12 +169,12 @@ function comicpress_display_post() {
|
||||||
<br class="clear-margins" />
|
<br class="clear-margins" />
|
||||||
</div>
|
</div>
|
||||||
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>
|
||||||
</div>
|
<div class="post-extras">
|
||||||
<div class="post-extras">
|
<?php comicpress_display_post_tags(); ?>
|
||||||
<?php comicpress_display_post_tags(); ?>
|
<?php comicpress_display_comment_link(); ?>
|
||||||
<?php comicpress_display_comment_link(); ?>
|
<div class="clear"></div>
|
||||||
<div class="clear"></div>
|
<?php comicpress_display_related_posts(); ?>
|
||||||
<?php comicpress_display_related_posts(); ?>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if (is_page()) { edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>'); } ?>
|
<?php if (is_page()) { edit_post_link(__('Edit this page.','comicpress'), '<p>', '</p>'); } ?>
|
||||||
<div class="post-foot"></div>
|
<div class="post-foot"></div>
|
||||||
|
|
Loading…
Reference in New Issue