from 2.0.5.acf_cf_user version Available new option ‘Enable searchbox by post Title’ and shortcode [searchbytitle]
after adding this shortcode to the map template you will have an autocomplete search that will filter markers by title by default
if you want to expand the search by other parameters you need to add search parametrs to the map shortcode attributes
any tag used in nav and tooltip templates and custom tags is available
eg custom tag ‘custom_project_locatie’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
if (class_exists('Locate_And_Filter_Addon_Helper')) { Locate_And_Filter_Addon_Helper::define_custom_tags( array( 'custom_project_locatie' =>'custom_project_locatie'), 'all', 'getDataCallbackFn_locateanything_project_locatie', 'custom_project_locatie' ); } function getDataCallbackFn_locateanything_project_locatie( $field, $id){ $html = ''; ob_start(); ?> <div class="tags_wrap tooltip_tags"> <div class="cat_services tags_list"> <?php $cat_services = get_the_terms( $id, 'project_locatie' ); if ($cat_services) { foreach ($cat_services as $key => $cat_service) { echo $cat_service->name; } } ?> </div> </div> <?php $html .= ob_get_contents(); ob_end_clean(); return strval($html); } |
the search will be performed by term names from the taxonomy ‘project_locatie’
eg ‘Didam’