Home › Forums › Calendar Products › Events Calendar PRO › Cost Field vanished after Event Ticket & Remove Word FREE
- This topic has 6 replies, 4 voices, and was last updated 9 years, 8 months ago by
kumar.
-
AuthorPosts
-
August 26, 2016 at 12:52 am #1156229
kumar
Participantas per Your instruction “https://theeventscalendar.com/knowledgebase/use-the-event-cost-field-with-tickets-installed/” we are able to restore the Cost Field in Admin Panel
But Big Issue is that when we put cost Word Free is still appearing in Front of the event Cost.
which we don’t want to vanish Completely. by one of yours solution on https://theeventscalendar.com/support/forums/topic/remove-price-from-events-page/Please HELP Us to remove the Word Free (appearing before price) and it should Display the Cost only.
Note:- very soon we are planning to purchase Ticket Pro but by the time do help us with this solution.
tnx & wating …August 26, 2016 at 12:55 am #1156230kumar
ParticipantThis reply is private.
August 26, 2016 at 8:27 am #1156341Geoff
MemberHey Kumar, thanks for getting in touch!
Good question. Just to confirm, you only want to remove the word “Free” from the event price range. Is that correct?
If so, please try using the snippet posted here:
We can use that to replace “Free -” with nothing at all. Something like this:
function tribe_custom_theme_text ( $translation, $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ย "Free -" to "" $custom_text = array( 'Free -' => '' ); // 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($translation, $custom_text) ) { $translation = $custom_text[$translation]; } return $translation; } add_filter('gettext', 'tribe_custom_theme_text', 20, 3);That seemed to do the trick when I tested it out. Will that work for you as well? Please let me know. ๐
Cheers!
GeoffAugust 26, 2016 at 5:34 pm #1156589kumar
ParticipantThis reply is private.
August 29, 2016 at 7:31 am #1157048Geoff
MemberHey Kumar, hope you had a great weekend!
So sorry about the snippet — turns out that it will not accept dashes in the translation. This will work instead:
function tribe_custom_theme_text ( $translation, $text, $domain ) { $custom_text = array( 'Free' => ' ', ); // 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($translation, $custom_text) ) { $translation = $custom_text[$translation]; } return $translation; } add_filter('gettext', 'tribe_custom_theme_text', 20, 3);Does that work for you as well? Please let me know. ๐
Cheers!
GeoffSeptember 20, 2016 at 9:35 am #1166433Support 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 ‘Cost Field vanished after Event Ticket & Remove Word FREE’ is closed to new replies.
