How To Create Custom Pagination In WordPress December 16, 2018 Hello, Friend's in this post we are creating a custom code of Pagination in WordPress. It is very easy to put this code on any custom template page. This code is not only for next or prev this code is showing a number, next, prev. 'offers', // Put Post Name 'posts_per_page' => get_option('posts_per_page'), 'paged' => $paged, 'post_status' => 'publish', 'ignore_sticky_posts' => true, 'category_name' => 'custom-cat', 'order' => 'DESC', 'ASC' 'orderby' => 'date' modified | title | name | ID | rand ); $custom_query = new WP_Query( $custom_query_args ); if ( $custom_query->have_posts() ) : while( $custom_query->have_posts() ) : $custom_query->the_post(); $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );?> // get the Feature Image > $custom_query-> max_num_pages // Put the this code where you want to show No of pagination )); endif; ?>
Comments