How to change the "Upcoming Events" word to something else.

Home Forums Calendar Products Events Calendar PRO How to change the "Upcoming Events" word to something else.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1334371
    Jaeden Tan
    Participant

    I 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!

    #1334587
    Jennifer
    Keymaster

    Hi 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

    #1334628
    Jaeden Tan
    Participant

    Hi 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,
    J

    #1336725
    Jennifer
    Keymaster

    Hi 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

    #1346670
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to change the "Upcoming Events" word to something else.’ is closed to new replies.