Example #1
0
/**
 * Returns a list of news posts without thumbnails, excluding the three posts already shown
**/
function get_opinion_list()
{
    $args = array('posts_per_page' => 8, 'category_name' => 'opinion');
    $the_query = new WP_Query($args);
    if ($the_query->have_posts()) {
        echo '<div class="row small-up-1 medium-up-2 large-up-2">';
        while ($the_query->have_posts()) {
            $the_query->the_post();
            // Column element
            echo '<div class="opinion column">';
            // Author name
            echo coauthors_author_info() . ' ยท ';
            // Link
            echo '<a class="headline" href="' . get_permalink(get_post()->ID) . '" title="' . esc_attr(get_post()->post_title) . '">';
            // Title
            echo get_the_title(get_post()->ID);
            echo '</a></div>';
        }
        echo '</div>';
    } else {
        // no posts found
    }
    wp_reset_postdata();
}
<!-- Desktop/Tablet -->
<div class="show-for-medium-up">

	<div class="large-2 columns">
		<div class="meta">
			<div class="author">

				<!-- Author Gravatar -->
				<!-- <?php 
echo get_avatar(get_the_author_meta('user_email'), $size = '114', $default = 'http://i.imgur.com/gxyK809.jpg');
?>
<br/><br/> -->

				<!-- Author link -->
				<?php 
coauthors_author_info();
?>
			</div><br/>

			<!-- Post date -->
			<div class="date">
				<?php 
the_date('l, F j, Y');
?>
			</div>
			<br/>

			<!-- Social sharing links -->
			<?php 
echo do_shortcode('[ssba]');
?>