[ad_1]
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 );