How can I display only the post titles from a selected category in columns?

Updated answer: Use two floated lists to emulate columns, same approach as previously though. <?php /* Template Name: PageOfPosts */ get_header(); ?> <div id=”content”> <div class=”t”> <div class=”b”> <div class=”l”> <div class=”r”> <div class=”bl”> <div class=”br”> <div class=”tl”> <div class=”tr”> <div class=”pad”> <?php while( have_posts() ) : the_post(); ?> <?php $category = get_post_meta( get_the_ID(), ‘category’, … Read more

Sortable columns by meta value holding a date – can’t get it to work

Is it not an option to insert the sorting directly to the WP_Query class? It has all the parameters for handling this kind of situation http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters If you want to do that in the code, you can first validate all the dates, then convert them to the standard ISO(yyyy-mm-dd) format & then use the standard … Read more

Split custom post list into two columns

You could count the number of items and insert </ul><ul> after 50%. Sample code, not tested: if ($postslist) { $count = 1; if($top) echo ‘<h4>’.$name.'</h4>’; echo ‘<ul>’; foreach ( $postslist as $post ) { echo ‘<li><a href=”‘.get_permalink($post->ID).'”>’.get_the_title($post->ID).”</a></li>”; if ( 0 === $count % 10 ) echo ‘</ul><ul>’; $count += 1; } echo ‘</ul>’; } And … Read more

Placing the content of one post in two side by side columns, newspaper style

Turns out there are specific CSS properties for columns: Here’s what worked for my case: .featured { -moz-column-count: 3; -moz-column-width:245px; -moz-column-gap: 40px; -webkit-column-count: 3; -webkit-column-gap : 40px; -webkit-column-width:245px; -moz-column-rule-color: #ccc; -moz-column-rule-style: solid; -moz-column-rule-width: 1px; -webkit-column-rule-color: #ccc; -webkit-column-rule-style: solid ; -webkit-column-rule-width: 1px; } And two refs for several other ways to go about it. ADVANCED 2 … Read more

How to create three columns from selected posts

You might not have expected this kind of solution but it is worth knowing that there is also a front end solution for this kind of problem. The css3 spec have a new feature called column-count, which will automatically render your text in multiple columns Here is a simple example from w3schools div { column-count:3; … Read more