glen.m
Member
Posted 11 months ago #
The plugin is working but my thumbnails are appearing far to the right. I'd like to have them on the left with the text/excerpt wrapped around them but there doesn't appear to be any settings to change the alignment of the images. Any ideas?
Screenshot: http://awesomescreenshot.com/0d3fajh3c
http://wordpress.org/extend/plugins/category-posts/
Rebecca
Member
Posted 10 months ago #
using WP 3.2.1 I went into the editor & made a change to the code which moved the thumbnail onto a line by itself under the title and centered it.
new code reads like this:
" title="<?php the_title_attribute(); ?>">
<p align="center"><?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?></p>
Hope this helps.
Mrmark
Member
Posted 6 months ago #
I too wanted my image thumbnail right-aligned in the post text, below the title. I did it by wrapping the title generation in paragraph tags and locating the thumbnail call to the excerpt line, using paragraph tags again to inline-style the image.
I hope this helps someone struggling to style thumbnails which out of the box are not styled.
<?php
if (
function_exists('the_post_thumbnail') &&
current_theme_supports("post-thumbnails") &&
$instance["thumb"] &&
has_post_thumbnail()
) :
?>
<p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"></p>
</a>
<?php endif; ?>
// inserts date
<?php if ( $instance['date'] ) : ?>
<p class="post-date"><?php the_time("j M Y"); ?></p>
<?php endif; ?>
// Inserts thumbnail after title in post text aligned right with flow
<?php if ( $instance['excerpt'] ) : ?>
<p style="float:right"><?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?>
<?php the_excerpt(); ?></p>
<?php endif; ?>