Support » Fixing WordPress » Wrapping excerpt around post_thumbnail

  • Resolved cableghost

    (@cableghost)


    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; }

    -Scott

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

    (@alchymyth)

    Forum Moderator

    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?

    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")); } ?>

    -Scott

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrapping excerpt around post_thumbnail’ is closed to new replies.