Created
November 22, 2017 11:35
-
-
Save rayrutjes/599995f83d394ed3e0cf69e5126f729e to your computer and use it in GitHub Desktop.
WordPress add Geoloc info to custom post type "profiles"
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
<?php | |
function add_geoloc_to_profiles($attributes) { | |
$attributes['_geoloc']['lat'] = 0; | |
$attributes['_geoloc']['lng'] = 0; | |
return $attributes; | |
} | |
add_filter('algolia_post_profiles_shared_attributes', 'add_geoloc_to_profiles'); | |
add_filter('algolia_searchable_post_profiles_shared_attributes', 'add_geoloc_to_profiles'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment