• Resolved antoniamar

    (@antoniamar)


    I’m sure this is simple but it is just beyond me. I am not a programmer by any stretch of the imagination and I can’t figure this out. There is a section on my page template that I want to covert from one column to two columns for displaying posts. I figured out a way to at least create the columns with css. What I can’t figure out is how to tell the second column to display different posts than in column 1. In this particular instance I want to display 5 posts in each column from the same category (so ten posts altogether). However, on other pages, I would like the posts in each column to come from different categories. So it would be great for me if the coding is the same and all I have to do is change the category id, etc. I am using the Revolution Theme. Thanks for any help you can give.

    The code that is in place now (gives me 2 columns but with duplicate posts):

    <?php $recent = new WP_Query("cat=603,539&showposts=5&offset=7"); while($recent->have_posts()) : $recent->the_post();?>

    <div class="columnistleft4">

    <h6><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h6>
    <?php the_content_limit(115, "[Read more]"); ?>

    </div>

    <div class="columnistright4">

    <h6><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h6>
    <?php the_content_limit(115, "[Read more]"); ?>
    </div>
    <?php endwhile; ?>
    </div>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to display different posts in Column 2?’ is closed to new replies.