Query Loop Block – Incorrect pagination custom filter code
-
I have added a filter to show a series of entries that meet certain requirements. The query is correct but the pagination is not correct. Shows the total number of pages you would have without filtering. I’m stuck and don’t understand why it’s happening. Here is my code in case you can help me. Thank you so much.
add_filter( 'generateblocks_query_loop_args', function( $query_args, $attributes ) { if (!is_admin() && !empty($attributes['className']) && strpos($attributes['className'], 'filtrar-por-practicas') !== false) { $query_args['meta_query'] = array( 'relation' => 'AND', array( 'key' => 'alum_imgcasoexitotrasera', 'compare' => '!=', 'value' => '', ), array( 'key' => 'alum_programa', 'value' => '15815', 'compare' => 'LIKE' ), ); } return $query_args; }, 10, 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Query Loop Block – Incorrect pagination custom filter code’ is closed to new replies.