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:
parent
2fab7b0aee
commit
f579d5615a
2 changed files with 11 additions and 0 deletions
|
@ -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(); ?>
|
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in a new issue