Skip to content

Instantly share code, notes, and snippets.

@nickstewart95

nickstewart95/Loader.php Secret

Created Dec 20, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.