Title: [Plugin: Category Posts Widget] Thumbnail Alignment
Last modified: August 20, 2016

---

# [Plugin: Category Posts Widget] Thumbnail Alignment

 *  [glen.m](https://wordpress.org/support/users/glenm-1/)
 * (@glenm-1)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-category-posts-widget-thumbnail-alignment/)
 * 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://awesomescreenshot.com/0d3fajh3c)
 * [http://wordpress.org/extend/plugins/category-posts/](http://wordpress.org/extend/plugins/category-posts/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rebecca](https://wordpress.org/support/users/yourgreenva/)
 * (@yourgreenva)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-category-posts-widget-thumbnail-alignment/#post-2144473)
 * 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](https://wordpress.org/support/users/mrmark/)
 * (@mrmark)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-category-posts-widget-thumbnail-alignment/#post-2144499)
 * 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.

 * ![](https://ps.w.org/category-posts/assets/icon-256x256.png?rev=1419008)
 * [Category Posts Widget](https://wordpress.org/plugins/category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-posts/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Mrmark](https://wordpress.org/support/users/mrmark/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-category-posts-widget-thumbnail-alignment/#post-2144499)
 * Status: not resolved