feat: add pagination support to article archive pages

Enabled pagination in the article archive template to improve navigation and user experience. Updated functions to include pagination support in the theme setup. This change will help users browse through multiple pages of articles more conveniently.
This commit is contained in:
Kumi 2024-06-20 11:37:41 +02:00
parent 2fab7b0aee
commit f579d5615a
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 11 additions and 0 deletions

View file

@ -54,6 +54,15 @@
<p><?php _e('Sorry, no articles found.', 'duck-behavior-journal'); ?></p>
<?php endif; ?>
</div>
<div class="row">
<div class="col-md-12">
<?php
echo paginate_links(array(
'total' => $loop->max_num_pages,
));
?>
</div>
</div>
</section>
<?php get_footer(); ?>

View file

@ -17,6 +17,8 @@ function duck_behavior_journal_setup()
'flex-height' => true,
'flex-width' => true,
));
add_theme_support('pagination');
}
add_action('after_setup_theme', 'duck_behavior_journal_setup');