I'm working on a website where the client wants a static page displaying information about a certain category. Then under the static information she wants all the posts from that category in a 2 column list.
So I need to have an alphabetically ordered list linking to all the post in a selected category. I have the code to do this, but I need to be able to break the list up in columns. Here is the code I have displaying the post...
<?php
if (is_page() ) {
$category = get_post_meta($posts[0]->ID, 'category', true);
}
if ($category) {
$cat = get_cat_ID($category);
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$post_per_page = -1; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
'category__in' => array($cat),
'orderby' => 'title',
'order' => 'asc',
'paged' => $paged,
'posts_per_page' => $post_per_page,
'caller_get_posts' => $do_not_show_stickies
);
$temp = $wp_query; // assign orginal query to temp variable for later use
$wp_query = null;
$wp_query = new WP_Query($args);
if( have_posts() ) :
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<_li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><_/li>
I know my HTML skills aren't the best, but here is the entire template page...
id="post">
is off by itself. Can you update your question to show the full code for your HTML generation?