Home › Forums › Calendar Products › Events Calendar PRO › Change the heading Labels Text
- This topic has 12 replies, 2 voices, and was last updated 12 years, 1 month ago by
hawkesley1.
-
AuthorPosts
-
February 9, 2014 at 3:59 am #102451
hawkesley1
ParticipantI 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);February 10, 2014 at 4:43 pm #102928Neill
MemberHi 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
NeillFebruary 10, 2014 at 4:44 pm #102930Neill
MemberHi 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
NeillFebruary 11, 2014 at 2:34 am #103105hawkesley1
ParticipantHi 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 historyFebruary 11, 2014 at 9:34 am #103280Neill
MemberHey 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
February 12, 2014 at 2:07 am #103612hawkesley1
ParticipantHi 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.February 12, 2014 at 12:14 pm #103806Neill
MemberHey 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
February 13, 2014 at 2:14 am #104066hawkesley1
ParticipantHi 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
mikeFebruary 14, 2014 at 3:26 pm #104740Neill
MemberHi 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
March 13, 2014 at 10:47 am #118377Neill
MemberHello 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
March 14, 2014 at 3:48 am #118666hawkesley1
ParticipantHi 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?March 25, 2014 at 5:59 am #122840Neill
MemberHello 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
March 27, 2014 at 5:13 am #123698hawkesley1
ParticipantThanks Niel,
That fixed it. -
AuthorPosts
- The topic ‘Change the heading Labels Text’ is closed to new replies.
