Pagination for custom posts loop

Post loop with pagination in the shortcode [title-snippet type=”post” limit=”5″]: function wpc_shortcode_title( $atts ) { extract( shortcode_atts( array( ‘limit’ => 5, ‘type’ => ‘post’), $atts ) ); $paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1; query_posts( array ( ‘posts_per_page’ => $limit, ‘post_type’ => $type, ‘order’ => ‘ASC’, ‘orderby’ =>’menu_order’, ‘paged’ => $paged ) ); $list=” “; … Read more

Show number of pagination pages even when total under two

It’s not possible. paginate_links() is hard-coded to stop producing output as soon as it notices that there’ll be less than 2 pages. You can see this on lines 4130–4132 of the function’s source code here: https://developer.wordpress.org/reference/functions/paginate_links/#source The only workaround would be to copy the code of paginate_links() into your own new function and change the … Read more

File not found.