I was using the plugin https://wordpress.org/support/plugin/ultimate-wp-query-search-filter to filter posts based on a form’s inputs. It worked perfectly on the search button click, but then i wanted to display all the search results on page load without clicking on search button.
The solution that worked for me:
Add below script at the end of the theme’s footer.php file just before </html> element
<script type=”text/javascript”>
jQuery(document).ready(function($) {
function loadAjax(){
var obj = $(“[id^=uwpqsffrom_]”);
process_data(obj);
return false;
}
window.onload = loadAjax;});
</script>