• I want to show two posts in the loop, next to each other in a table. Is there a way to manipulate the counter inside the loop to do this? I want to do something like this:

    while ( have_posts() ) : the_post() ?>
    
    <table>
    <tr>
    <td><?php the_content();  ?></td>
    [GOTO NEXTPOST]
    <td> <?php the_content();  ?></td>
     </tr>
    </table>       
    
     endwhile

    [Please post code snippets between backticks or use the code button.]

    Anyone any idea how to do the [GOTO NEXTPOST] within this loop?

    thanks!

Viewing 1 replies (of 1 total)
  • restrict the loop to two posts; then:

    <table>
    <tr>
    <?php while ( have_posts() ) : the_post(); ?>
    
    <td><?php the_content();  ?></td>
    
    <?php endwhile; ?>
    </tr>
    </table>
Viewing 1 replies (of 1 total)

The topic ‘How do I show two posts in the loop?’ is closed to new replies.