' . esc_html__( 'Prev', 'oswald' ) . '',
'next_text' => '' . esc_html__( 'Next', 'oswald' ) . '',
));
endwhile;
wp_reset_postdata();
// Related Posts
if ( oswald_option("related_posts") == "1") {
if ($layout == 'none') {
$items_per_line = '3';
} else {
$items_per_line = '2';
}
echo '';
}
// If comments are open or we have at least one comment, load up the comment template.
if ( (comments_open() || get_comments_number()) && oswald_option('post_comments') == "1" ) :
comments_template();
endif;
?>
'' . esc_html__('Related Posts', 'oswald') . '
';
$wpd_wp_query = new WP_Query();
// Get Cats_ID
if (get_the_category()) $categories = get_the_category();
if ($categories) {
$post_categ = '';
$post_category_compile = '';
foreach ($categories as $category) {
$post_categ = $post_categ . $category->cat_ID . ',';
}
$post_category_compile .= '' . trim($post_categ, ',') . '';
}
$args = array(
'posts_per_page' => ($layout == 'none') ? 3 : 2,
'orderby' => 'rand',
'ignore_sticky_posts' => 1,
'cat' => $post_category_compile
);
$blog_post_likes = oswald_option('blog_post_likes');
$wpd_wp_query->query($args);
while ($wpd_wp_query->have_posts()) : $wpd_wp_query->the_post();
oswald_get_template_part( 'template-parts/post/content', '', array(
'show_author' => '1',
'blog_post_listing_content' => '1',
'symbol_count' => 105,
'show_likes' => $blog_post_likes,
'show_share' => '0',
'show_date' => '0',
'parameters' => array(
'image_proportional' => '4_3'
)
));
endwhile;
wp_reset_postdata();
echo '