has_image code that replaces the_title()'s on blog comic and page, will do the rest later

Signed-off-by: Philip M. Hofer (Frumph) <frumph_dragon@yahoo.com>
This commit is contained in:
Philip M. Hofer (Frumph) 2009-11-16 19:10:41 -08:00
parent c9965b3b91
commit c69449745f
4 changed files with 37 additions and 20 deletions

View File

@ -20,13 +20,6 @@ function display_blog_post() {
<div class="<?php comicpress_post_class(); ?>">
<div class="post-head"></div>
<div class="post" id="post-<?php the_ID() ?>">
<?php if (function_exists('the_post_image')) {
if ( has_post_image() ) { ?>
<div class="post-image">
<?php the_post_image(); ?>
</div>
<?php } ?>
<?php } ?>
<div class="post-info">
<?php if ($enable_post_author_gravatar == 'yes') { ?>
<div class="post-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
@ -38,7 +31,17 @@ function display_blog_post() {
</div>
<?php } ?>
<div class="post-text">
<?php if (function_exists('the_post_image')) {
if ( has_post_image() ) { ?>
<div class="post-image">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_post_image('full'); ?></a>
</div>
<?php } else {?>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php } ?>
<?php } else { ?>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php } ?>
<div class="post-author"> By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?></div>
<?php if ($disable_categories_in_posts != 'yes') { ?>
<div class="post-cat"><?php _e('Posted In:','comicpress'); ?> <?php the_category(','); ?></div>

View File

@ -19,13 +19,6 @@ function display_comic_post() {
<div class="<?php comicpress_post_class(); ?>">
<div class="post-comic-head"></div>
<div class="post-comic" id="post-comic-<?php the_ID() ?>">
<?php if (function_exists('the_post_image')) {
if ( has_post_image() ) { ?>
<div class="post-image">
<?php the_post_image(); ?>
</div>
<?php } ?>
<?php } ?>
<div class="post-comic-info">
<?php if ($enable_comic_post_author_gravatar == 'yes') { ?>
<div class="post-comic-author-gravatar"><?php echo str_replace("alt='", "alt='".get_the_author_meta('display_name')."' title='".get_the_author_meta('display_name'),comicpress_get_avatar(get_the_author_meta('email'), 64)); ?></div>
@ -37,7 +30,17 @@ function display_comic_post() {
</div>
<?php } ?>
<div class="post-comic-text">
<?php if (function_exists('the_post_image')) {
if ( has_post_image() ) { ?>
<div class="post-comic-image">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_post_image('full'); ?></a>
</div>
<?php } else {?>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php } ?>
<?php } else { ?>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php } ?>
<div class="post-comic-author"> By <?php the_author_posts_link(); ?> on <?php the_time('F jS, Y'); ?></div>
<?php if (get_option('comicpress-enable-storyline-support') == 1) { ?>
<ul class="storyline-cats"><li class="storyline-root"><?php the_category(' &raquo; </li><li>', multiple) ?></li></ul>

View File

@ -5,10 +5,18 @@
<div class="<?php comicpress_post_class(); ?>">
<div class="post-page-head"></div>
<div class="post-page" id="post-<?php the_ID() ?>">
<?php if (function_exists('the_post_image')) {
if ( has_post_image() ) { ?>
<div class="post-page-image">
<?php if (function_exists('the_post_image')) the_post_image(); ?>
<?php the_post_image('full'); ?>
</div>
<?php } else { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<?php } else { ?>
<h2 class="pagetitle"><?php the_title() ?></h2>
<?php } ?>
<br class="clear-margins" />
<div class="entry">
<?php the_content() ?>
<?php wp_link_pages(array('before' => '<div class="linkpages"><span class="linkpages-pagetext">'.__('Pages:','comicpress').'</span> ', 'after' => '</div>', 'next_or_number' => 'number')); ?>

View File

@ -457,6 +457,9 @@ h3, h3 a {
margin-bottom: 40px;
}
.post-image, .post-comic-image, .post-page-image {
}
.post-info, .post-comic-info {
padding-bottom: 5px;
font-size: 10px;