Change Event Categories title in WP admin

Home Forums Calendar Products Events Calendar PRO Change Event Categories title in WP admin

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1137483
    Colleen
    Participant

    I’m wondering if there is a function I can use to change the default “Event Categories” title to something else on the wp-admin side (in the meta box). I have been searching and found a way to change the title in output on the template of the actual site, but I need backend help. Anything you can do to point me in the right direction would be much appreciated!

    #1138083
    Nico
    Member

    Howdy Colleen,

    Welcome to our support forums and thanks for reaching out to us!

    Have you tried with the snippet in this knowledge base article: Change the wording of any bit of text or string ? It will change all occurrences of the matched text so might not fit if you are only looking for to change it in the back-end. If that’s the case plase let me know and I’ll try to adapt the snippet to just affect the back-end.

    Hope you have a great week,
    Best,
    Nico

    #1138091
    Colleen
    Participant

    Hi Nico,

    Thanks for getting back to me! I am looking for just a back-end change only, not the every instance. Any direction you can provide would be awesome. Thanks so much!

    Colleen

    #1138872
    Nico
    Member

    Hey Colleen,

    Please past the snippet below in your theme’s (or child theme’s) functions.php file:


    /* Tribe change translation string in the back-end */
    function tribe_custom_theme_text ( $translations, $text, $domain ) {

    if ( !is_admin() ) return $text;

    $custom_text = array(
    '%s Categories' => '%s Taxonomy',
    );

    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);

    Change %s Taxonomy for your custom translation and check to see if it works!

    Best,
    Nico

    #1138879
    Colleen
    Participant

    Shoot! That didn’t seem to do it. I have the snippet in my theme’s function.php file and I changed out %s Taxonomy to just test but no luck on changing the title of the meta box.

    Colleen

    • This reply was modified 9 years, 9 months ago by Colleen.
    #1139356
    Nico
    Member

    Thanks for following up!

    I just tested this locally (changing ‘%s Taxonomy’ for ‘test’) and I can see it working as expected: https://cloudup.com/cOrpDeCTTNz – on the menu and on the metabox title. There are other translations that are not changed like ‘+ Add New Event Category’, but those are different translation strings. Are you referring to these ones or you are not seeing any change at all?

    Also, are you sure the script is in the correct functions.php file? If you use the example on this article: Change the wording of any bit of text or string does it work as expected?

    Please let me know about it,
    Best,
    Nico

    #1139706
    Colleen
    Participant

    Hi Nico,

    So sorry for the confusion on my end– I completely goofed. The solution DOES work; I just didn’t have the pro version active on my test site. I was only using the free version of The Events Calendar. I activated the pro version and it worked like a charm!

    Thanks again for all of your help with this one,
    Colleen

    #1139780
    Nico
    Member

    Stocked to hear Colleen and glad to be of service 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Change Event Categories title in WP admin’ is closed to new replies.