Home › Forums › Calendar Products › Events Calendar PRO › Events Pro- Map view
- This topic has 5 replies, 4 voices, and was last updated 9 years, 6 months ago by
Kate.
-
AuthorPosts
-
September 3, 2016 at 12:08 pm #1159730
Kate
ParticipantHi- Is there a way to change the pin tag in the map from “Event” to somethings else? I have tried in the functions.php but that worked for everything else apart from the map?
September 5, 2016 at 8:09 am #1160006Cliff
MemberHi Kate. Could you please provide a link to the code snippet you’re using and to your site’s Map View and an annotated screenshot of what you’re seeing there (the “Event” not changing text so I know where to look on your site)?
September 5, 2016 at 12:05 pm #1160095Kate
ParticipantThanks Cliff,
he screen shot is below, and I have just used the below in functions php (which works everywhere I want it to apart from the map):/*
* EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR
* See the codex to learn more about WP text domains:
* http://codex.wordpress.org/Translating_WordPress#Localization_Technology
* Example Tribe domains: ‘tribe-events-calendar’, ‘tribe-events-calendar-pro’…
*/
function tribe_custom_theme_text ( $translations, $text, $domain ) {// Put your custom text here in a key => value pair
// Example: ‘Text you want to change’ => ‘This is what it will be changed to’
// The text you want to change is the key, and it is case-sensitive
// The text you want to change it to is the value
// You can freely add or remove key => values, but make sure to separate them with a comma
// This example changes the label “Venue” to “Location”, and “Related Events” to “Similar Events”
$custom_text = array(
‘Events’ => ‘Classes’,
‘Event’ => ‘Class’,
‘Recurring %s’ => ‘Other class dates available’,
‘Show Filters’ => ‘Refine your search’,
);// If this text domain starts with “tribe-“, “the-events-“, or “event-” and we have replacement text
if( (strpos($domain, ‘tribe-‘) === 0 || strpos($domain, ‘the-events-‘) === 0 || strpos($domain, ‘event-‘) === 0) && array_key_exists($text, $custom_text) ) {
$text = $custom_text[$text];
}return $text;
}
add_filter(‘gettext’, ‘tribe_custom_theme_text’, 20, 3);September 6, 2016 at 8:07 am #1160356Cliff
MemberKate, thanks for sharing. I see you started with the snippet from https://theeventscalendar.com/knowledgebase/change-the-wording-of-any-bit-of-text-or-string/ and customized it for your needs, which is great.
The map tooltip you’re trying to re-word is from Line 1188 of /wp-content/plugins/events-calendar-pro/src/Tribe/Main.php
You’ll need to add
Event:(with the trailing space after the colon) to your list of strings to replace.So you could add this to your list of strings to replace:
'Event: ' => 'Class: ',I hope this answers your question!
September 28, 2016 at 9:35 am #1169865Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Events Pro- Map view’ is closed to new replies.
