Home › Forums › Calendar Products › Events Calendar PRO › Engine Theme & Tribe Events Conflict Question
- This topic has 3 replies, 2 voices, and was last updated 11 years, 1 month ago by
Brian.
-
AuthorPosts
-
April 20, 2015 at 6:33 am #956625
jade
ParticipantHello,
I have a theme by Engine Themes that comes bundled with their own “Events” code embedded in their theme. It is really more of a “Promotions” box with limited display of content on a per page/client basis.
We use Tribe Events for our main “Events” display for obvious reasons (TRIBE ROCKS!).
So, in my left Admin column I have 2 “Events” navigation links, and within my theme I have events for each “business location” and we have events for the community that serve more as a community bulletin board.
I’d like to separate these two “Events” areas. My theme author provided this functions.php code:
add_filter('gettext', 'et_translate_text' , 99, 3); function et_translate_text ( $translated_text, $text, $domain ) { $translation = array ( 'Events' => 'Promotions' ); if( isset( $translation[$text] ) ) { return $translation[$text]; } return $translated_text; }That code worked very well, but it also changed all my Tribe Events text/labels as well. I feel like I can’t see the forest because of all the trees in my way 🙂
What am I overlooking to make tribe stay as it is, but still be able to kill the confusion with the ‘other’ events section? Any ideas?
April 20, 2015 at 8:07 am #956697Brian
MemberHi,
Thanks for using our plugins! I can help out here.
It looks like that coding does not have a $domain set so it is changing everything with events in it.
We have this guide for changing the word events in our plugin.
https://theeventscalendar.com/knowledgebase/changing-the-word-events-to-something-else/
So if you can use this part:
if(strpos($domain, 'tribe-') === 0) { }to adapt your coding to target just the theme’s use of events.
You will want to change tribe- to the text domain of the theme.
Not sure what that is, but the theme author maybe to help.
Let me know if you have any follow up questions.
Thanks
April 20, 2015 at 6:09 pm #956902jade
ParticipantThanks Brian!
My text-domain was simply “enginetheme” which unlocked the magic 🙂
Works like a charm – PEACE!April 21, 2015 at 5:29 am #956978Brian
MemberI am glad to see you were able to figure it out.
I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘Engine Theme & Tribe Events Conflict Question’ is closed to new replies.
