Adding ELSE argument to AJAX Live Search for “No results found”

Try to not using endif and endwhile, just use curly brakets {} to determinate ifs body or add :after elseelse:` Your problem is that you mix two syntaxes. Read this to fully understand how to write alternative syntax https://www.php.net/manual/en/control-structures.alternative-syntax.php add_action(‘wp_ajax_data_fetch’ , ‘data_fetch’); add_action(‘wp_ajax_nopriv_data_fetch’, ‘data_fetch’); function data_fetch() { $post_search_query = new WP_Query(array(‘posts_per_page’ => -1, ‘s’ => … Read more

Bots using internal wordpress search

I suggest using a security plugin which will do everything for you. Like iThemes Security Bans troublesome user agents, bots and other hosts https://wordpress.org/plugins/better-wp-security/

How to hide an option from dropdown in filter module

Nevermind. I applied this custom js to hide that specific taxonomy in the dropdown. <script> jQuery(function($){ var arr=[‘name-of-slug-to-hide’]; $(‘select[name=”wpv-category”] option’).each(function(){ if(jQuery.inArray($(this).val(), arr)>=0){ $(this).hide(); } }); }) </script>