category page with pagination and filter
This commit is contained in:
parent
528ddcee31
commit
dad25818b9
3 changed files with 45 additions and 4 deletions
|
|
@ -13,6 +13,31 @@ get_header();
|
||||||
} ?>
|
} ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
<div class="tx-indexedsearch">
|
||||||
|
|
||||||
|
<div class="tx-indexedsearch-browsebox">
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
global $wp_query;
|
||||||
|
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
||||||
|
$post_count_start = (($paged -1) * 10) + 1;
|
||||||
|
$post_count_end = ((($paged -1) * 10) + $wp_query->post_count);
|
||||||
|
_e("Showing results from", 'kit') . _e(" <strong>" . $post_count_start . " to " . $post_count_end . "</strong>. Total results: <strong>" . $wp_query->found_posts. "</strong>");
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<div class="tx-indexedsearch-browsebox">
|
||||||
|
<?php the_posts_pagination( array(
|
||||||
|
'mid_size' => 2,
|
||||||
|
'prev_text' => __( '< Previous', 'kit' ),
|
||||||
|
'next_text' => __( 'Next >', 'kit' ),
|
||||||
|
'type' => 'list',
|
||||||
|
'before_page_number' => __('Page ', 'kit')
|
||||||
|
) ); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container container-3-cols">
|
<div class="container container-3-cols">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -52,6 +77,18 @@ get_header();
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tx-indexedsearch">
|
||||||
|
<div class="tx-indexedsearch-browsebox">
|
||||||
|
<?php the_posts_pagination( array(
|
||||||
|
'mid_size' => 2,
|
||||||
|
'prev_text' => __( '< Previous', 'kit' ),
|
||||||
|
'next_text' => __( 'Next >', 'kit' ),
|
||||||
|
'type' => 'list',
|
||||||
|
'before_page_number' => __('Page ', 'kit')
|
||||||
|
) ); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,3 +139,11 @@ h2.screen-reader-text {
|
||||||
.search-term {
|
.search-term {
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tx-indexedsearch .tx-indexedsearch-browsebox ul li .current {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tx-indexedsearch .tx-indexedsearch-browsebox ul li {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ get_header();
|
||||||
) ); ?>
|
) ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
@ -86,9 +85,6 @@ get_header();
|
||||||
'before_page_number' => __('Page ', 'kit')
|
'before_page_number' => __('Page ', 'kit')
|
||||||
) ); ?>
|
) ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue