currently I have installed wordpress v4.7.2 and created a child-theme by twentyfifteen
I have create a custom post type.
now when browse the localhost, I got as should be the list, and the pagination is not working :( :
for example for page2 points
localhost/page/2/
--
when accessing as localhost/works
the code Im using also on archive and template files, is the following :
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
'next_text' => __( 'Next page', 'twentyfifteen' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
) );
<!--when WORKS is as default page homepage-->
works-template.php
<!--when access it via localhost/works-->
archive-works.php
the only different is that on works-template.php, calling the query_posts()
<?php
$posts_per_page = get_query_var('posts_per_page');
$paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
$args = array('post_type' => 'works','posts_per_page'=> $posts_per_page ,'post_status' => 'publish' ,'orderby' => 'menu_order','order' => 'ASC','paged' =>$paged);
query_posts( $args );
// Start the Loop.
while ( have_posts() ) : the_post();
any suggestion?