WordPress: How to position Post Thumbnail

1 replies
  • WEB DESIGN
  • |
Hello, could you help me how to position thumbnail in WP 2012 theme to be right of excerpt?
Thanks in advance!
#position #post #thumbnail #wordpress
  • Profile picture of the author run
    - Open content.php file of the theme.
    - Aprox. line 18 remove this code
    PHP Code:
    <?php the_post_thumbnail(); ?>
    - In the same file content.php find this code
    PHP Code:
    <div class="entry-summary"
    - add these code right below it
    PHP Code:
    <div class="thumbnail-right">
    <a href="<?php the_permalink(); ?>" title="<?php printfesc_attr__'Permalink to %s''twentytwelve' ), the_title_attribute'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail('excerpt-thumbnail''class=alignright'); ?></a>
    </div>
    Note: I have added a class="thumbnail-right". You could use this for styling. In addition, I add the link to the single post on the Thumbnail as well.

    - Use these code in your functions.php if you want to add the Thumnail Sizes
    PHP Code:
    // Add 140x140 image size
    add_image_size('excerpt-thumbnail'120120true); 
    That's it!

    Note: Better to use child theme for customization.
    Signature
    I just wanna tell you that most of the links in the signature are trash and/or a trap to make you pay!
    {{ DiscussionBoard.errors[8187742].message }}

Trending Topics