[resolved] Wrapping excerpt around post_thumbnail (3 posts)

  1. cableghost
    Posted 5 years ago #

    I'm having trouble wrapping my excerpt around the post_thumbnail. Below is the respective code I present use.

    <?php if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) { the_post_thumbnail(array('class' => 'post_thumbnail_left')); } ?><?php the_excerpt(); ?>

    .post_thumbnail_left { float: left; margin-right: 5px; }


  2. Michael
    Forum Moderator
    Posted 5 years ago #

    a link to your site might get you more replies.

    it could be an interference from other styles (?)

    does the class get applied to the thumbnail?

  3. cableghost
    Posted 5 years ago #

    As I did not want to post the actual site, I started making the changes to my test site and it worked. Anyhow, the below code is the code which worked for me, so it ware the php coding.

    <?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(120,96), array("class" => "alignleft post_thumbnail_left")); } ?>


Topic Closed

This topic has been closed to new replies.

About this Topic