• I’m trying to get my post thumb to work but it doesn’t, i’m planning to show 2 columns of posts in index.php , each column has thumb image in the left + post title and post content in the right, but i don’t know how to accomplish that . it’s look like its CSS problem.

    below is my code
    <div class=”inner”>

    <?php $args = array(‘posts_per_page’ => 6); ?>
    <?php if ( have_posts() ): ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <div class=”post-pic”>
    “> <h2> <?php the_title();?> </h2>
    <?php the_post_thumbnail(‘post-thumb’); ?>
    <div><?php the_content(); ?></div>
    </div>
    <?php endwhile; ?>
    <?php endif; ?>
    </div><!– END INNER –>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Tommy tomaye

    (@tommy-tomaye)

    so in each column the image should be floated to the left and the content
    to the right

    Team Startbit

    (@vivacityinfotechjaipur)

    HiTommy,
    Try this code, I have added some CSS code for making like you need.

    [code]
    <div class="inner">
    <?php $args = array('posts_per_page' => 6); ?>
    <?php if ( have_posts() ): ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <div class="row">
    <div class="post-pic" style="float: :left">
    <?php the_post_thumbnail('post-thumb'); ?>
    <div>
    <div style="float: right">
    <h2> <?php the_title();?> </h2>
    <?php the_content(); ?>
    </div>
    </div>
    <?php endwhile; ?>
    <?php endif; ?>
    </div><!-- END INNER -->
    [/code]

    Thanks

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

The topic ‘post thumb image problem’ is closed to new replies.