function Theme_pagination() {
if( (!empty($options['extra_pagination']) && $options['extra_pagination'] == '1' ) {
global $wp_query;
$total_pages = $wp_query->max_num_pages;
if ($total_pages > 1){
{
$current_page = max(1, get_query_var('paged'));
echo '<div id="pagination">';
echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'format' => '/page/%#%',
'current' => $current_page,
'total' => $total_pages,
));
echo '</div>';
}
}
} else{
{
if( (get_next_posts_link() || get_previous_posts_link() ) {
echo '<div class="pagination col-lg-12">';
if ( get_previous_posts_link() ) : ?>
<div class="next-post margint20 button pull-left "><">
<?php previous_posts_link( __( 'NEWER POST ', 'Themes-fm' ) ); ?></div>>
<?php endif;
/div>
<?php endif;
if ( get_next_posts_link() ) : ?>
<div class="prev-post margint20 button pull-right"><?phpif next_posts_link( __get_next_posts_link( 'OLDER POST', 'Themes-fm' ) ); : ?></div>>
<?php endif;<div
class="prev-post margint20 button pull-right">
echo '</div>';
<?php next_posts_link( __( 'OLDER POST', 'Themes-fm' ) ); ?>
}
}
}
}
Here's the quick recap of the problem:
example.com</?s=catdiv>
(Let's say there are 10 posts matching to cat keyword with 5 posts per page on search<?php results)endif;
Results: 5 posts on the first page>Clicked on Older Posts button and next 5 posts.
example.com/store/cat
Results: First 5 posts on the first page>clicked on Older posts and pageecho says'</div>';
"No Posts Founds As Per Your Search Terms"
}
I need to do something to pagination or the rewrite rule? I
don't have any idea what}
to do next... any idea?
Thanks in advance... :)}
Here's the quick recap of the problem:
example.com/?s=cat
(Let's say there are 10 posts matching to cat keyword with 5 posts per page on search results)
Results: 5 posts on the first page>Clicked on Older Posts button and next 5 posts.
example.com/store/cat
Results: First 5 posts on the first page>clicked on Older posts and page says "No Posts Founds As Per Your Search Terms"
I need to do something to pagination or the rewrite rule? I don't have any idea what to do next... any idea? Thanks in advance... :)