Making category posts run horizontally not vertically
-
Right now, my theme allows me to input multiple category numbers in my theme settings page and the # of posts I specify from each category will appear in my left column, vertically down the page. I decided to make my theme a 2 column instead of 3 column, and want those (6) category posts to now display 3 posts across the page, in 2 rows, just under my featured posts slideshow: planetthrive.com. How can I do this?
Here is the code on my index page that calls the category posts:
<!-- BEGIN category posts --> <div class="category"> <?php $categories = get_categories('hide_empty=1&include=' . fs_settings('home_categories')); foreach ($categories as $category) : query_posts('showposts=' . fs_settings('home_category_length') . '&cat='.$category->cat_ID); if (have_posts()) : $count = 0; ?> <div class="box"> <h2><?php echo $category->name ?></h2> <ul> <?php while (have_posts()) : the_post(); $count++; $titlewidth = 22; ?> <li<?php if ($count==1) echo ' class="first"'; ?>> <a href="<?php the_permalink(); ?>"><?php echo fs_clean($post->post_title, $titlewidth); if (strlen($post->post_title)>$titlewidth) echo '...'; ?></a> <a class="attachment" href="<?php the_permalink(); ?>"><?php fs_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a> <p><?php echo fs_clean($post->post_content, 105); ?>...</p> </li> <?php endwhile; ?> </ul> <p class="note"><a href="<?php echo get_category_link($category->cat_ID); ?>"><?php fs_lang("More from this category"); ?></a></p> </div> <?php endif; endforeach; ?> </div> <!-- END category posts -->
Is it just a matter of adjusting the CSS or do I need to modify the code above? Any help appreciated, I am not a programmer. Thanks!!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Making category posts run horizontally not vertically’ is closed to new replies.