• Basically, I want to show the latest 10 posts titles of a specific category, but I want it to be split into 2 columns

    Like.

    Post 1 Post 6
    Post 2 Post 7
    Post 3 Post 8
    Post 4 Post 9
    Post 5 Post 10

    How can I do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am interested in this as well ??

    Hello,
    You can do it with the get_posts function.

    <div id="column1">
    	<?php
    	$posts = get_posts('category=WHATEVER&numberposts=5');
    	foreach($posts as $post):
    	setup_postdata($post);
    	?>
    	<?php
    	the_content();
    	?>
    	<?php endforeach; ?>
    </div>
    <div id="column2">
    	<?php
    	$posts = get_posts('category=WHATEVER&numberposts=5&offset=5');
    	foreach($posts as $post):
    	setup_postdata($post);
    	?>
    	<?php
    	the_content();
    	?>
    	<?php endforeach; ?>
    </div>

    In ‘category’ you set the cat’s number. I believe you can use too ‘categoryname’.

    In your CSS you set the width and position of your columns.
    Don’t forget to fill, in the second column, the adequated offset for it.
    Logically you can complete the php calls with the_title(); the_author(); etc.

    Hope that helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show latest 10 posts, but split into 2 columns?’ is closed to new replies.