Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Category Posts Widget] Thumbnail Alignment’ is closed to new replies.