Change the heading Labels Text

Home Forums Calendar Products Events Calendar PRO Change the heading Labels Text

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #102451
    hawkesley1
    Participant

    I would like to refer to Events as Appointments and therefore wish to change the title that appear. e.g. in the Month view’ Events for February 2014′ to’ Appointments for February 2014′
    I have tried this code from your tutorial series but don’t get the required result.function filter_translations($translation, $text, $domain) {
    if ($domain == ‘tribe-events-calendar’) {
    switch ($text) {
    case ‘Events’:
    $translation = ‘Appointments’;
    break;
    }
    switch ($text) {
    case ‘Organizer’:
    $translation = ‘Host’;
    break;
    }
    }
    return $translation;
    }
    add_filter(‘gettext’, ‘filter_translations’, 10, 3);

    #102928
    Neill
    Member

    Hi There,
    Thanks for the info and I think we can point you in the right direction here as this is a common request from our users.

    Would it be possible to get your gode in a Gist (https://gist.github.com/) so that we can be sure we have the right code. Maybe go ahead and drop the whole file in their and clearly comment what you have added?

    That would be really helpful.
    Thanks
    Neill

    #102930
    Neill
    Member

    Hi There,
    Thanks for the info and I think we can point you in the right direction here as this is a common request from our users.

    Would it be possible to get your gode in a Gist (https://gist.github.com/) so that we can be sure we have the right code. Maybe go ahead and drop the whole file in their and clearly comment what you have added?

    That would be really helpful.
    Thanks
    Neill

    #103105
    hawkesley1
    Participant

    Hi Neil,
    I have not used Gist and am unsure how to go about it.
    The code I used is a function I added to my theme’s (Twenty Ten) functions file and is taken from your tutorial.
    I am not sure what other code you might nee when you say full code.
    If this (below) is not enough please can you clarify.
    Thanks
    mike

    //change headings on certain views in The Evetnts Calendar
    add_filter(‘tribe_get_events_title’, ‘change_upcoming_events_title’);

    function change_upcoming_events_title($title) {
    //We’ll change the title on upcoming and map views
    if (tribe_is_upcoming() or tribe_is_map() or tribe_is_photo()) return ‘Upcoming Appointments’;

    //In all other circumstances, leave the original title in place
    return $title;
    }
    Show message history

    #103280
    Neill
    Member

    Hey Mike –

    Gist is a tool that we use to make sure the code and its correct formatting gets coppied – If you go to Gist -( https://gist.github.com/) – you can just copy and paste your functions file in, save it and share the URL with us and we’ll be able to see what you have going on. Alterntively you could use another tool like http://snippi.com/ – again does the same thing and really assures we are seeing exactly the same code as you.

    It would be nice to see the full functions file too, that way we can be sure there’s no other code that is conflicting with it.

    As an example here’s the code you pasted above – but notice how it formats it – if you could do the same but with the with functions.php file we’ll be able to get a better look at whats going on. These forum posts aren’t the best way to share code unfortunately as sometimes the formatting gets a little skewed. Hope that all makes sense.

    Neill

     

    #103612
    hawkesley1
    Participant

    Hi Neil
    Ok I understand.
    I have made a file there I hope with the linkhttps://gist.github.com/hawkesley/8952801
    look forward to hearing from you.

    #103806
    Neill
    Member

    Hey hawkesely1

    Thanks for doing that, that was a huge help to ruling out that nothing else was causing a conflict.

    I have taken your original fix that you used from the tutorial and added in tribe_is_month() which was all it was missing to make your customized title show up on the month view. Taking your code and adding in the moth view should look like this: http://snippi.com/s/ovlrhsl

    I’ve used this exact code on my local install and it worked so let me know if this will do it for you. Also let me know if you don’t understand the addition that I made.

    Neill

    #104066
    hawkesley1
    Participant

    Hi Neil,
    Yes that worked OK and I have applied the logic to the other views.
    The one problem is the map view. When selected it briefly shows Appointments (I dropped the upcoming) and then reverts to ‘Upcoming Appointments’)
    Any ideas?
    Secondly is there somewhere in the documentation where the functions that handle the text thats displayed can be found with some explanation of how to apply the changes.
    I have found several postings (not necessarily on the forum)which talk about this but no straightforward guidance. It might save support a lot of time.
    Can you help?
    Many thanks
    mike

    #104740
    Neill
    Member

    Hi Hawkesley,

    Thanks for getting back to us. I’m not sure what whould be causing that issue as I’m not seeing it on my local install. Is it possible to resend us an updated version of what you have in your functions file? That way I can try again to run what you have running and see if I can see the issue.

    As for documentation have you seen our doc files: http://docs.tri.be/ – These documents are pretty detailed – for example here’s some info on the month template class: http://docs.tri.be/Events-Calendar/class-Tribe_Events_Month_Template.html – hope this points you in the right direction. If you have any specific questions feel free to drop us another forum post with the details – having it split out its own post will get it the right attention.

    Neill

    #118377
    Neill
    Member

    Hello hawkesley1,

    Just checking in here to see if you are all set? Is this still an issue? Just want to make sure you get taken care of.

    Thanks

    – Neill

    #118666
    hawkesley1
    Participant

    Hi neil,
    Thanks for checking back.
    I think I have handle on the text labels for the the main views now thanks.
    However how do I change the Calendar Widget Label?

    #122840
    Neill
    Member

    Hello Mike,

    Sorry for the delay here mike – your reply seemed to slip through the cracks. You should be able to change the widget titles in the widgets option in the admin. Here’s a screenshot: https://cloudup.com/cTqXYw6yD3R

    If that doesn’t answer your question – maybe send me a screenshot of what exactly you’d like changed and we’ll see if we can point you in the right direction.

    – Neill

    #123698
    hawkesley1
    Participant

    Thanks Niel,
    That fixed it.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Change the heading Labels Text’ is closed to new replies.