Created
April 27, 2022 05:13
-
-
Save genesis16/86695c5ad0be1d8066f91f5b21502e76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for practical purposes I have called this template archive-template | |
but if your custom post type category is moves you would call this archive-movies.php. | |
I have set the posts to 9, but you can set it to however many you want. | |
$paged = ( get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array( | |
'post_type' => 'insight', | |
'post_status' => 'publish', | |
'posts_per_page' => 9, | |
'paged' => $paged, | |
'order' => 'DESC', | |
); | |
// after your loop/endif statement, call in the pagination function using a div class of pagination | |
<div class="pagination"><?php pagination('»', '«'); ?></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment