Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search doesn't show custom fields › Reply To: Search doesn't show custom fields
Hi,
Thank you for the details!
Unfortuantely that is not caused by the plugin. There is a 3rd party script changing the search input checkbox states to “checked=false” – therefore the handler sees them as unchecked.
That is the reason why it works on the back-end, that script is probably not loaded there. Unfortunately I can’t tell which script it is or where it is originating from, that is impossible to debug via the console. The only way you can get to the bottom of it is by switching the theme temporarily to see if that helps, if not, then turning off all plugins one-by-one, and eventually it will start working.
There might be still hope thoug, by force resetting the filters on the initial page load. Luckily, there is an API function within the plugin for that.
Try adding this code 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.
add_action('wp_footer', 'asp_wp_footer_action');
function asp_wp_footer_action() {
?>
<script>
window.addEventListener('DOMContentLoaded', function() {
ASP.api(1, 'resetSearch')
});
window.addEventListener('load', function() {
ASP.api(1, 'resetSearch')
});
</script>
<?php
}