Home › Forums › Calendar Products › Events Calendar PRO › change placeholder label in search bar
- This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by
George.
-
AuthorPosts
-
February 28, 2016 at 2:31 am #1083054
Matthew
ParticipantHi,
Not long back I had a problem changing the placeholder label on the search bar which Brook solved for me nicely. The snippet no longer seem to be working as the field is labelled location again. Here is the previous support thread:
Here is a screenshot of what I’ve got:
https://nimbus.everhelper.me/client/notes/share/407158/u0cb5bme1i90iblizwzo
Has the snippet been affected by an update to TEC? Could someone update the snippet so that it works again?
Thanks,
MatFebruary 28, 2016 at 5:34 pm #1083178George
ParticipantHey @Matthew,
I’m sorry about this code no longer working!
I think this is something we should make more easily filterable, and I will discuss doing so with a developer and see if we can include some filters in some upcoming future release.
For now, however, I have cooked up a JavaScript solution that should work well. I know JavaScript isn’t ideal, but it should hopefully work well as just a temporary solution for now:
add_action( 'wp_footer', 'change_location_placeholder_text' );function change_location_placeholder_text() {
if ( ! tribe_is_event() )
return; ?><script type="text/javascript">
document.getElementById( 'tribe-bar-geoloc' ).placeholder = 'Enter City or Zip';
</script><?php
}☝️ Paste that into your theme’s functions.php file and let me know if it helps!
Thanks,
GeorgeMarch 2, 2016 at 3:15 am #1084220Matthew
ParticipantHi George,
That works nicely, thanks.
I definitely thing you guys should consider adding customization of this text as an option in an update. The main reason is people will often enter a state and it returns no results even when there are loads of events in that state. I know from forum posts that this is more to do with how google maps works, but customizing the text will allow users to solve the problem themselves.
Just as a side note. I installed Geo my WP and had the developer insert some customizations to add a ‘use my location’ button and google suggestions to the near field. It works awesome. Anyway, I thought you guys might be interested in adding this feature. You can see it here:
March 2, 2016 at 6:01 am #1084267George
ParticipantThank you, @Matthew!
That’s a neat customization for sure, and when it comes to adding better support for changing the labels and such, we’re totally on board and are trying to implement some simple filters for such changes.
Thanks for your patience with our code until those features finally arrive; for now, the snippet I shared should do a decent temporary job. I hope you find this to be the case and I wish you the best of luck with your site!
— George
-
AuthorPosts
- The topic ‘change placeholder label in search bar’ is closed to new replies.
