Engine Theme & Tribe Events Conflict Question

Home Forums Calendar Products Events Calendar PRO Engine Theme & Tribe Events Conflict Question

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #956625
    jade
    Participant

    Hello,

    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?

    #956697
    Brian
    Member

    Hi,

    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

    #956902
    jade
    Participant

    Thanks Brian!

    My text-domain was simply “enginetheme” which unlocked the magic 🙂
    Works like a charm – PEACE!

    #956978
    Brian
    Member

    I 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!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Engine Theme & Tribe Events Conflict Question’ is closed to new replies.