Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Another question on checkboxes UX › Reply To: Another question on checkboxes UX
April 30, 2025 at 1:40 pm
#53850
Keymaster
Hi,
No worries, I have not answered because I couldn’t find a solution to this yet.
Maybe via a custom code where checking if there was no option set, but I’m not sure if this works at all:
add_filter(
'asp_query_args',
function ( $args ) {
if ( isset($_POST['options']) && !str_contains($_POST['options'], 'customset') ) {
$args['post_type'] = array( 'product', 'page', 'story', 'event', 'team', 'faq', 'video' );
}
return $args;
}
);
Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.