Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Hiding Search Bar › Reply To: Hiding Search Bar
November 4, 2024 at 12:15 pm
#51693
Keymaster
Sure!
I assume you only want to apply this rule to the first search bar (id=1), then this modified version will do the trick:
add_filter( 'asp_shortcode_output', function( $output, $id ){
if ( $id != 1 ) {
return $output;
}
if ( get_the_ID() !== 389 ) {
return '';
}
return $output;
}, 10, 2 );