Home › Toolset Professional Support › [Resolved] Customization home page filter search
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
Tagged: Custom search, Toolset Maps, Views, Views plugin
Related documentation:
This topic contains 20 replies, has 2 voices.
Last updated by annaA-2 3 years, 11 months ago.
Assisted by: Minesh.
Hello,
I've followed you instruction (thanks for support) to customize my home page filter search by city/state and now I think it's ok but I'd need more tips about:
- change "Show results within of" and "Enter a location" text (this is an Italian site)
- change the "hover" and "focus" "Find my location" button style or (the best) transform it in a locator image (see attachment)
- show on the first search page only three fields (place/structure/search) and add more check filters on the landing page?
Thanks a lot for your help.
ps: the homepage is located here: removed (please, if you can hide this link)
Best Anna
Hello. Thank you for contacting the Toolset support.
As per our support policy we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery.
So, lets address the issue one by one:
- change "Show results within of" and "Enter a location" text (this is an Italian site)
==>
You can translate the "Show results within of" text using the "inputs_placeholder" attribute.
For example:
[wpv-control-distance default_distance="50" default_unit="mi" compare_field="address" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit" inputs_placeholder="your translated text %%DISTANCE%% of %%CENTER%%"]
To translate the "Enter a location" text we will require to add some custom JS code
Hi Minesh,
thanks for reaply, I beg your pardon, for the future I'm going to ask just only on question per ticket.
I've putted your code in a shortcode custom field, now the text changed but it's already changed the text "Use my position" that I had changed by setting block.
I've tried to add the "inputs_placeholder" attribute by editor by code view but maybe I put it in a wrong position and every brake.
Could you give me more tips please.
Thanks best.
Anna
Sorry I do not get what you are saying.
Can you please share few screenshot and problem URL where you try to add the filter and tell me what exactly not working and once I review your issue I will be able to guide you in the right direction.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
The only way to change the text is to add custom JS code:
I've added the following code to your view's "Custom JS and CSS" section under the JS box:
jQuery(document).ready(function($){ x = $( ".wpv-custom-search-filter__input div.form-group"); console.log(x); x[0].innerHTML = x[0].innerHTML.replace(/^Show results within/g, 'Your text'); $("#toolset-maps-distance-center").attr("placeholder","your text") });
You can change the "your text" with your desired text.
Hi Anna,
Lets fix the issue one by one.
I've adjusted the JS code added as given under:
jQuery(document).ready(function($){ x = $( ".wpv-custom-search-filter__input div.form-group"); str = x[0].innerHTML.replace(/^Show results within/g, 'Dove'); str = str.replace(/ of/g, ''); x[0].innerHTML = str; $("#toolset-maps-distance-center").attr("placeholder","Dove vuoi andare?") });
I can see now of word is not displayed. Can you please confirm.
Hi Minesh,
yes I confirm you, now of word is not displayed.
Thank you. Best.
Anna
Great - so do you have any other issue now?
Hi Minesh,
sorry but, as I mentioned in the last post, there is a problem after you JS code customization. Before that the automated complete of a place was working, not now. If I wrote "R" in the search by place (Dove vuoi andare?) automatically the system proposed to me different places (like: Roma RM, Italia - Rajkot Gujarat, India - Raipur Chhattisgarh, India....and so on).
Thank you.
Best
Anna.
Can you please check now: hidden link
I've set the text on right sidebar and I can see its working. I've removed the JS code i've added:
=> hidden link
The Enter a location string is fixed. I've added the JS code to fix that.
jQuery(document).ready(function($){ $("#toolset-maps-distance-center").attr("placeholder","Dove vuoi andare?") });
The dropdown options will start to pullout one you start to search couple of times. It seems like its coming from cache.
Hi Minesh,
do you thing it's possible to fix the last problem, maybe deleting cache, or not? If I build a new one and I don't add any customization it works. Thank you best. Anna