-
-
Save nickstewart95/d6f18dff97e9e7873c5b0447f3e834b5 to your computer and use it in GitHub Desktop.
This file contains 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
add_shortcode('algolia_search', function () { | |
//Check to see if there is a query | |
$query = get_search_query(); | |
if (!empty($query)) { | |
//Setup Algolia | |
//Set search results | |
} else { | |
$searchResults = false; | |
} | |
ob_start(); | |
//include search results template | |
return ob_get_clean(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment