Hi,
Looks like I found the solution for you. Please use following code snippet
add_action( 'wp_head', 'my_aws_head' );
function my_aws_head() { ?>
<script>
window.addEventListener('load', function() {
jQuery('.aws-search-btn').on( 'click', function (e) {
var form = jQuery(this).closest('.aws-search-form');
var searchField = form.find('.aws-search-field');
if ( searchField.val() === '' ) {
searchField.val('awsfilter');
searchField.closest('form').submit();
}
});
}, false);
</script>
<?php }
add_filter('aws_search_query_array', 'my_aws_search_query_array');
function my_aws_search_query_array( $query ) {
if ( strpos( $query['search'], 'awsfilter' ) !== false ) {
$query['search'] = '';
$query['relevance'] = '1';
}
return $query;
}
You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.
Regards