• I have a ‘Featured Posts’ section on my homepage, using a loop which pulls three posts from the’Featured’ category and displays them inline.
    I want to space out the three posts accross the width of the page.
    Here is an image to show what I want
    Image
    Is there any easy way to do this?
    Here is my code for the loop.

    <?php $my_query = new WP_Query(‘category_name=Featured&showpost=3’);
    while ($my_query->have_posts()): $my_query->the_post();
    $thumb = get_post_meta($post->ID, ‘thumb-small’, true);?>
    <div class=”feature”>
    <*a>”><img src=”<?php echo $thumb; ?>” alt=”<?php the_title() ?>” />
    <h2>“><?php the_title() ?></h2>
    </div>
    <?php endwhile; ?>

    So i basically want the first and second posts to have a right margin but not the third, no matter which posts are featured.

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Spacing inline posts’ is closed to new replies.