list wordpress post titles from one category in multiple columns in alphabetical order -


i trying build kind of archive of client's projects, display @ bottom of each page, done in 'experience' section here: http://toth.com/#experience - except in case need full list of projects, not sub-headings or other structure.

i have things setup each of client's projects post. need way display titles of posts, category i've created 'work archive' (so client can add , remove things archive easily, checking/unchecking category box in each post), in vertical alphabetical order, across 4 columns automatically resize fill container equally. each post title in archive needs link post, obviously.

i have been scouring net days, , while i've found pieces of code they'll help, seems impossible (with limited php knowledge) integrate them fulfill of requirements. have looked many wordpress plugins, again no success. while i'll accept solution, ideally i'd rather solve @ php/template level, keep things hidden client backend possible.

any on appreciated.

it sounds best way might set new wp query object. more info on here: http://codex.wordpress.org/class_reference/wp_query

<?php  $args = 'category_name=work-archive&orderby=title&order=asc&posts_per_page=9999'; // assuming 'work-archive' slug category, doing ascending order title (a,b,c,d), , pulling 9999 posts (hopefully more number of posts have!)  // query $query = new wp_query( $args );  // keeping track of count $count = 0;  // number of items per column $num_per_column = round($query->post_count / 4); // dividing total columns  // loop if ( $query->have_posts() ) : ?>     <ul>     <?php while ( $query->have_posts() ) : $query->the_post(); ?>          <?php if ( $count % $num_per_column == 0 ) : // if current count it's limit throw in new column ?>     </ul>     <ul>         <?php endif; ?>           <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>          <?php $count++; // increment counter ?>      <?php endwhile; ?>     </ul> <?php endif;   /* restore original post data */ wp_reset_postdata();  ?> 

finish off w/ css!


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -