Home › Forums › Calendar Products › Events Calendar PRO › How to change month view title
- This topic has 2 replies, 3 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
June 23, 2015 at 12:45 am #972066CarlParticipant
Hey Team, I would like to change the title of “Events for..” on the month view but i would like to retain the month and the year.
I have followed a tutorial from
https://theeventscalendar.com/knowledgebase/altering-or-removing-headings-on-calendar-views/this completely change the title. I would like to have it as “Course Schedule for [current-month-year]”
Thank you very much.
Regards,
SinghJune 23, 2015 at 6:03 am #972124GeorgeParticipantHey Carl,
I shared that link with you in your other forum post about this, and at this time the methods described there are the best methods for changing the title.
If you want to be more specific about your modifications, then you’ll have to write more specific code for the modified title.
For example, if you want to preserve everything but change just “Events for” to “Course Schedule for” (to preserver the month name and year, for example) then you could use PHP’s str_replace() function to just swap out these specific words. Like this:
add_filter( 'tribe_get_events_title', 'example_filtering_the_title' ); function example_filtering_the_title( $title ) { if ( strpos( $title, 'Events for' ) !== false ) { return str_replace( 'Events for', 'Course Schedule for', $title ); } return str_replace( 'Events', 'Courses', $title ); }
This is unfortunately the most help we can provide here, since you’ll have to take the reins on customizing the code to fit your needs exactly, but between this information and the information I shared in your original thread from yesterday you have enough to work with. I will close that other thread which is at https://theeventscalendar.com/support/forums/topic/changing-the-text-on-the-main-events-page/.
We can keep any further conversation about this customization in this thread, just to keep things organized.
Thanks,
GeorgeJuly 8, 2015 at 7:00 am #984708Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘How to change month view title’ is closed to new replies.