'post', 'posts_per_page' => 1, ); $postc = get_posts($args); $post_count = count($postc); if ($post_count > 0) { ?>
$sticky_posts, ); $sticky_query = new WP_Query($sticky_args); // Output sticky posts while ($sticky_query->have_posts()) : $sticky_query->the_post(); endwhile; wp_reset_postdata(); $sticky_post_count = $sticky_query->post_count; } else { $sticky_post_count = 0; } $currentpage = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; // Get the current page number $argsposttwo = array( 'post_type' => 'post', 'posts_per_page' => 12, 'paged' => $currentpage, ); // If there are sticky posts, adjust the posts_per_page for regular posts if (($sticky_post_count > 0) && ($currentpage == 1)) { $argsposttwo['posts_per_page'] -= $sticky_post_count; } $loopposttwo = new WP_Query($argsposttwo); ?> have_posts() ) : while ( $loopposttwo->have_posts() ) : $loopposttwo->the_post(); ?>

__('Previous', 'ahona'), 'next_text' => __('Next', 'ahona'), )); ?>