Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Show results onload homepage › Reply To: Show results onload homepage
June 23, 2015 at 12:31 pm
#5080
Hi Ernest,
unfortunately your solution is not working, or I’m coding wrong your code.
I have edited footer with:
<script type="text/javascript">
jQuery(function($) {
// Change this variable to any search prhase if you want to
var searchPhrase = "Playa";
var $input = $($("input.orig").get(0));
$input.val(searchPhrase);
$input.keyup();
});
</script>
I setted up behavour to “Minimal character count to trigger search” option to 0
It only shows search box with keyword “Playa” inside, but doesn’t show any results where I placed results shortcode. Only when I begin to type again it shows results.
Thanks for your quick answer. Awesome support.
Regards!