Home › Forums › Calendar Products › Events Calendar PRO › How to change the "Upcoming Events" word to something else.
- This topic has 5 replies, 2 voices, and was last updated 8 years, 8 months ago by
Jaeden Tan.
-
AuthorPosts
-
August 12, 2017 at 1:35 am #1334371
Jaeden Tan
ParticipantI like to change the default text from “Upcoming Events” to “Upcoming Sales Events”.
Would it be possible to share with me which file contains this text? Thanks!
August 12, 2017 at 10:53 pm #1334587Jennifer
KeymasterHi Jaeden,
Thanks for reaching out!
We actually have an article with instructions on changing strings around your site. Alternatively, you could use the tribe_get_events_title filter, found in wp-content/plugins/the-events-calendar/src/functions/template-tags/loop.php, to change the $title string. Note that you will not want to edit that file directly, as doing so will result in your changes being lost the next time the plugin is updated.
Let me know if you have any questions!
Thanks,
Jennifer
August 13, 2017 at 1:31 am #1334628Jaeden Tan
ParticipantHi Jennifer,
Thanks for your response. It helped alot. If you dont mind, may i ask another question.
Like to know in which file is the logic of the title for category pages located.
I would like to remove the front portion of the text before the category title. But i cant seem to find this logic. Apperciate if you can point me in the direction of which file.
Cheers,
JAugust 17, 2017 at 7:04 am #1336725Jennifer
KeymasterHi Jaeden,
I’m glad that helped!
The page title is actually coming from the tribe_get_events_title function found in wp-content/plugins/the-events-calendar/src/functions/template-tags/loop.php. Note that this isn’t one of the files you can copy over into your theme, and you don’t want to edit it directly as your changes will be erased with future plugin updates. However, you can use the tribe_get_events_title filter to adjust the title. So you could do something like:
function tribe_change_category_page_title( $title ) {
global $post;
if ( tribe_is_event_category( $post->ID ) ) {
$cat = get_queried_object();
$title = $cat->name;
return $title;
} else {
return $title;
}
}
add_filter( 'tribe_get_events_title', 'tribe_change_category_page_title' );You can add that to the functions.php file of your child theme. Let me know if that helps!
Thanks,
Jennifer
September 8, 2017 at 9:35 am #1346670Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘How to change the "Upcoming Events" word to something else.’ is closed to new replies.
