Pagination and 404 error
-
Hi, I have error on listing page with limited job post to 10. When I click 2,3 etc page i have error 404
At function.php i have add ( see at previous topic) code
function wphelp_custom_pre_get_posts( $query ) { if( $query->is_main_query() && !$query->is_feed() && !is_admin() && is_category() ) { $query->set( 'paged', str_replace( '/', '', get_query_var( 'page' ) ) ); } } add_action( 'pre_get_posts', 'wphelp_custom_pre_get_posts' ); function wphelp_custom_request( $query_string ) { if ( isset( $query_string['page'] ) ) { if ( '' != $query_string['page'] ) { if ( isset( $query_string['name'] ) ) { unset( $query_string['name'] ); } } } return $query_string; } add_filter( 'request', 'wphelp_custom_request' );
also permalink slug’s are ok but still have 404
- The topic ‘Pagination and 404 error’ is closed to new replies.