Created
July 23, 2018 14:42
-
-
Save rayrutjes/defc1c91517d19f9cd8c33fa2fe5db76 to your computer and use it in GitHub Desktop.
Hide autocomplete snippet on custom condition - WordPress - Algolia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'algolia_autocomplete_config', function ( $config ) { | |
if (true) { // Replace this condition to match your needs. | |
// Autocomplete enabled. | |
return $config | |
} | |
// Autocomplete disabled. | |
return array(); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment