Home › Forums › Calendar Products › Events Calendar PRO › Events for text
- This topic has 5 replies, 2 voices, and was last updated 8 years, 3 months ago by
kanaeokana.
-
AuthorPosts
-
January 8, 2018 at 5:36 pm #1420956
kanaeokana
ParticipantI’d like to remove the “Events for ” part of “Events for January”. Where/how can I do this?
January 8, 2018 at 9:02 pm #1421015Crisoforo
KeymasterHi there.
I’m not quite sure from where exactly you would like to remove this section of the title, if you can give us a more detailed location we can give a better guidance on this issue.
In the meantime, I can provide a possible solution. If this is happening on the main title of the events you can use a filter and add the following snippet of code in your functions.php file inside of your current active theme.
function tribe_get_events_title_update( $title ) { // Removes 'Events for' from the titles. return str_replace( 'Events for', '', $title ); } add_filter( 'tribe_get_events_title', 'tribe_get_events_title_update' );Another thing you can do is change how layouts are generated, we have a guide for Themer’s that you can follow along if you want to change how a layout is generated.
Please let me know if you have any other questions about this issue or if there’s anything else I can do for you.
Thanks,
CrisoforoJanuary 9, 2018 at 4:13 pm #1421962kanaeokana
ParticipantWorked perfectly! Thank you.
I modified slightly:
function tribe_get_events_title_update( $title ) {
// Removes 'Events for' from the titles.
$title = str_replace( 'Events for ', '', $title );
$title = str_replace( 'week', 'Week', $title );
return $title;
}
add_filter( 'tribe_get_events_title', 'tribe_get_events_title_update' );January 9, 2018 at 4:14 pm #1421963kanaeokana
ParticipantWorked perfectly! Thank you.
I modified slightly:
function tribe_get_events_title_update( $title ) {
// Removes 'Events for' from the titles.
$title = str_replace( 'Events for ', '', $title );
$title = str_replace( 'week', 'Week', $title );
return $title;
}
add_filter( 'tribe_get_events_title', 'tribe_get_events_title_update' );January 10, 2018 at 8:42 am #1422577Crisoforo
KeymasterHi!
I’m glad you were able to find the snippet useful, please let us know if there is anything else we can do for you in the future and don’t hesitate to reach out again, have a good day.
Thanks,
Crisoforo -
AuthorPosts
- The topic ‘Events for text’ is closed to new replies.
