WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Wrapping excerpt around post_thumbnail (3 posts)

  1. cableghost
    Member
    Posted 3 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; }

    -Scott

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 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
    Member
    Posted 3 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")); } ?>

    -Scott

Topic Closed

This topic has been closed to new replies.

About this Topic