WP Pagenavi is not working with custom post type

WP Pagenavi is not working with custom post type

Sometime WP Pagenavi is not working with custom post type or WP-PageNavi Not Showing Page 2. It isn’t 404 error. You can copy and paste this code in your theme’s function.php it will work.

add_filter( 'redirect_canonical', 'custom_disable_redirect_canonical' );
function custom_disable_redirect_canonical( $redirect_url ) {
	if ( is_paged() && is_singular() ) $redirect_url = false; 
		return $redirect_url; 
}

Comments

comments

Share