I have been searching for hours, trying to figure out how to display blog posts in 2 columns on the blog page in a wordpress website i am working on.
WP version is 4.3
The php file to render the blog post listings is templates/posts.php
I am trying to figure out how to modify this file to show a simple 2 column layout. I am not fussy as to how it is displayed. If someone can point me in the right direction or give me some pointers on the easiest way. That would be great.
Thanks in advance,
Here is the templates/posts.php file..
<?php
$page_total = $wp_query->max_num_pages;
$page_number = max(1, get_query_var('paged'));
$paging = blog_paging($page_number, $page_total);
$html = $paging;
while(have_posts()) {
the_post();
$html .= tabs(3).'<article id="post-'.$post->ID.'">'.PHP_EOL;
$html .= tabs(4).'<header>'.PHP_EOL;
$html .= tabs(5).'<h2><a href="'.get_permalink($post->ID).'">'.$post->post_title.'</a></h2>'.PHP_EOL;
$html .= tabs(5).'<ul class="meta">'.PHP_EOL;
$html .= tabs(6).'<li>'.get_comments_popup_link(__('Leave a comment', 'allsorters'), __('1 Comment', 'allsorters'), __('% Comments', 'allsorters'), 'comments').'</li>'.PHP_EOL;
$html .= tabs(6).'<li><time datetime="'.$post->post_date.'">'.get_the_time(get_option('date_format')).'</time></li>'.PHP_EOL;
$html .= tabs(6).'<li><em>by</em> '.get_the_author().'</li>'.PHP_EOL;
//$html .= tabs(6).'<li>Posted in: '.get_the_category_list(', ').'</li>'.PHP_EOL;
if(current_user_can('manage_options')) $html .= tabs(6).'<li class="button-edit-post"><a href="'.get_edit_post_link($post->ID).'">Edit</a></li>'.PHP_EOL;
$html .= tabs(5).'</ul>'.PHP_EOL;
$html .= tabs(4).'</header>'.PHP_EOL;
$html .= tabs(4).'<div class="content">'.PHP_EOL;
$html .= tabs(5).apply_filters('the_content', get_the_excerpt());
$html .= tabs(4).'</div>'.PHP_EOL;
$html .= tabs(3).'</article>'.PHP_EOL;
}
$html .= '<br />'.$paging;
echo $html;
?>