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?
cuetable
Member
Posted 1 year ago #
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.