Forums › Sweet Date Theme Integration › Radius not working?
- This topic has 8 replies, 2 voices, and was last updated 5 years, 11 months ago by
Leah Harold.
-
AuthorPosts
-
June 13, 2016 at 1:13 am #52755
Leah Harold
MemberHi – we are very much in testing phase and only have a few test profiles in place, but have noted that the radius set in the Geo My WP settings (500km) is not being applied to Member search results.
If we search Auckland then we get results, but if we search nearby towns eg Warkworth or Pukekohe, we get no results, but should do with the Auckland listings being within this radius zone.
Could you please have a look and see if you can figure out what I have done wrong?
ThanksPrivate Content HiddenJune 13, 2016 at 2:45 pm #52781Eyal Fitoussi
MemberHi Leah,
If we search Auckland then we get results, but if we search nearby towns eg Warkworth or Pukekohe, we get no results, but should do with the Auckland listings being within this radius zone.
Thats because the actual address field of GEO my WP is hidden ( using CSS display:none ) in the page. You need to use the address field provided by GEO my WP Sweet-date add-on to be able to search based on location.
June 13, 2016 at 6:15 pm #52782Leah Harold
MemberThanks, this is great.
A couple of questions…
1) can we change the “Enter Address…” placeholder to “City or Town”?
2) Do you know how I can get this field to show on the SweetDate horizontal search form (see home page) instead of the current City/Town field?Cheers
June 14, 2016 at 5:11 pm #52799Eyal Fitoussi
MemberYou are welcome.
1) You can change the placeholder using the script below ( added to the functions.php file of the theme ):
1234567function gmw_sd_modify_address_field_ph( $labels ) {$labels['address_placeholder'] = 'City or Town';return $labels;}add_filter( 'gmw_sd_labels', 'gmw_sd_modify_address_field_ph' );2) You could maybe do that by editing a plugin’s core file. The plugin features are restricted to the “members” page so maybe by removing this restriction the features will work in the home page as well.
You can try the below:
1) Open thefile geo-my-wp/plugins/sweetdate-geolocation/loader.php
2) Change line 41 which should be
1if ( bp_current_component() == 'members' ) {to
1if ( bp_current_component() == 'members' || is_front_page() ) {3) Save the file and test it.
I am not sure but it might work.
I hope that helps.
June 22, 2016 at 12:56 am #52871Leah Harold
MemberThank you for the change of placeholder.
Unfortunately the addition of it to the horizontal form on the homepage did not work, but thank your for your assistance.Cheers
LeahJune 22, 2016 at 4:46 pm #52878Eyal Fitoussi
MemberYou are welcome Leah.
I am not sure how the home page search form works so I can’t provide you with a solution at the moment. I will however look into that for a future update.
June 27, 2016 at 5:26 pm #52930Leah Harold
MemberHi there – happy if to open another ticket if preferred, but will be same login info as this one…
Is it at all possible to make the list of locations that auto-populate in what was the “Address” field (now City/Town) to only show Cities and Towns?
Our issue is now, that when someone chooses the country from the dropdown box (which we would like to keep, as this service will only available in these 7 countries), they can still select anywhere in the world from the new City/Town box (e.g. typing Au and both Auckland and Australia show up still after selecting New Zealand as the country). Obviously people can’t find any members that are in both New Zealand and a city based elsewhere, and we are just trying to reduce the amount of possible user error.If there is a better way to achieve this (and still get radius results), please let me know – I am open to suggestions!
Thanks!
July 3, 2016 at 4:59 pm #53041Leah Harold
MemberI opened a new ticket for this
July 10, 2016 at 1:33 am #53149Leah Harold
MemberThis sorted the homepage horizontal search inclusion issue 🙂
https://docsdep.geomywp.com/forums-site/topic/add-fields-to-search-form/ -
AuthorPosts
You must be logged in to reply to this topic.