• Hello everyone,

    I am hoping that one (or more) of you WP gurus might be able to help me with an issue that I am experiencing with my WP site.

    In a nutshell, I am attempting to wrap the excerpt for each blog post around the featured image thumbnail of each post, as it displays on my home page. For some reason, however, while the thumbnails work fine, the excerpted text next to them is jumbled and looks to be devoid of any formatting, giving it an unprofessional look. I’ve attached a link to a screenshot of the homepage, since my site is currently in maintenance mode.

    The code pertaining to the excerpt that comes with the page template which I am using for my home page is as follows:

    <p>
        <?php
        $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
        if(function_exists('has_post_thumbnail') && has_post_thumbnail() && !$hideThumbnail){
    	?><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('featured_box_img', array('class'=>'img-frame')); ?></a><?php
        }
        $excerpt = substr(get_the_excerpt(), 0, 100);
        $excerpt = 'alignleft';
        echo $excerpt.'[...]';
     ?>
        </p>

    I am by no means an excerpt when it comes to coding, and I hope that one of you will be able to assist me with finding the correct parameters for achieving a clean-looking text wrap for my excerpts.

    Thank you guys in advance!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Wrapping excerpt text around image?’ is closed to new replies.