Please help me to win the battle with 2 column loop by category

You should not use query_posts more than one time. It will create errors. You have to use wp_query. Here is what it says in wordpress codex: query_posts( is meant for altering the main loop. Once you use query_posts(), your post-related global variables and template tags will be altered. Conditional tags that are called after you … Read more

Simple Data Table Update and Page Integration

Though I don’t think this is really a WordPress question, I’ll go ahead and answer anyway. 😉 I think you’d be much better off using an unordered list and some css to get the 2 column effect you’re looking for without much effort when updating. The markup for your lists would look something like this: … 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

Make custom post type column sortable

I believe the missing piece to your puzzle is one additional filter to perform the sort and return the sorted data. Try something like the following: function sort_column_by_auction_1357( $vars ){ if ( isset( $vars[“orderby”] ) && “auction” == $vars[“orderby”] ) { $vars = array_merge( $vars, array( “orderby” => “auction” ) ); } return $vars; } … Read more

Display WP posts in 3 responsive columns

<?php $the_query = new WP_Query(“showposts=6&cat=1&orderby=rand”); while ( $the_query ->have_posts() ) {$the_query ->the_post(); $i++; if ($i == 1){echo “<div class=row-fluid>”;} ?> <div class=”span4″> Random Post <?php echo $i ; ?> </div> <?php if ($i == 3){echo “</div><div class=row-fluid>”;} if ($i == 6){echo “</div>”;$i=0;} } wp_reset_postdata(); ?>