[ad_1]
Replies: 2
I have the following shortcode,
[ajax_load_more
id="products_list"
...
custom_args="rating:5"
]connected to the following filter in a code snippet.
add_filter(
'alm_query_args_products_list',
'alm_do_stuff', 10, 2
);
function alm_do_stuff( $args, $id ) {
if ( isset( $args['rating'] ) )
{
// do stuff
}
return $args;
}
The value of $args['rating'] in the filter code should be 5, but it’s undefined.
