Hello. I'm trying to get a placeholder in input text of custom search. I have seen that there is an opction to get a label up, down, after or before, but I need to get a text inside of input text of custom search that shows... search by address
You want to replace the placeholder text "Enter a location" in the filter input for the centre of the search radius?
It's not possible within the UI, and checking through the code it doesn't appear readily customisable.
I'd say you have 2 options. One is to simply add a little JS to the page which updates the placeholder attribute of the select input with the required text. (The input has an ID of "toolset-maps-distance-center" which you can use to target the correct element.)
Alternatively this is how the string is registered in the code base:
$enter_a_location_translated = esc_attr( __( 'Enter a location', 'toolset-maps' ) );
So you could use the gettext hook to filter the string, or—better—the modified hook to target the toolset-maps text domain, i.e. gettext_toolset-maps:
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Please, let me know if you need any additional details. Have a nice day.
The topic ‘[Closed] Placeholder in custom search input text’ is closed to new replies.