How to change month view title

Home Forums Calendar Products Events Calendar PRO How to change month view title

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #972066
    Carl
    Participant

    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,
    Singh

    #972124
    George
    Participant

    Hey 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,
    George

    #984708
    Support Droid
    Keymaster

    This 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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to change month view title’ is closed to new replies.