pagination and archive tweaks

This commit is contained in:
Ross Trottier 2024-08-22 09:48:35 -06:00
parent 280973cc13
commit b0fa6a1384
2 changed files with 17 additions and 0 deletions

View File

@ -52,6 +52,14 @@ function my_widgets_init() {
} }
add_action( 'pre_get_posts', 'set_archive_page_post_count' );
function set_archive_page_post_count( $query ) {
if ( $query->is_archive() && $query->is_main_query() && !is_admin() ) {
$query->set( 'posts_per_page', 13 );
}
}
// Breadcrumbs // Breadcrumbs
function custom_breadcrumbs() { function custom_breadcrumbs() {

View File

@ -1317,6 +1317,15 @@ a.page-numbers,
color: #fff; color: #fff;
} }
.page-numbers .current {
background-color: #FFDB12;
color: #414b4c;
}
li:has(> .current) { /* styles to apply to the li tag */
background-color: #FFDB12;
}
@media (min-width: 760px) { @media (min-width: 760px) {
ul.page-numbers { ul.page-numbers {
justify-content: center; justify-content: center;