I currently have simple pagination set up showing the text older and newer. If one of the text isn't needed it display an 'inactive' version of it so that the text doesn't disappear.
<?php if( get_next_posts_link() ) :?>
<div id="next-post-link" class="post-pag flL"><?php next_posts_link( '<i class="icon-left-open-big"></i><span>Older</span>' );?></div>
<?php else: ?>
<div id="next-post-link" class="post-pag inactive flL"><i class="icon-left-open-big"></i><span>Older</span></div>
<?php endif; ?>
<?php if( get_previous_posts_link() ) :?>
<div id="prev-post-link" class="post-pag flR"><?php previous_posts_link( '<span>Newer</span><i class="icon-right-open-big"></i>' );?></div>
<?php else: ?>
<div id="prev-post-link" class="post-pag inactive flR"><span>Newer</span><i class="icon-right-open-big"></i></div>
<?php endif; ?>
This is working fine however I'm struggling to achieve a page counter. I've looked at several questions about numbered pagination but it seems over the top for what I want. I'm looking to print the current page that I'm on and print the total amount of pages all the time.
This image should show what I mean better:
This is my Query so far:
$current_page = get_query_var( 'paged' );
$pages = $wp_query->max_num_pages;
$args = array(
'paged'=> $paged,
'posts_per_page' => '2'
);
$wp_query = new WP_Query($args);
if ($wp_query->have_posts()) :