Change all instances of RSVP to Sign Up

Home Forums Ticket Products Event Tickets Plus Change all instances of RSVP to Sign Up

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1347350
    Chip Cooper
    Participant

    Hi,

    Not having good luck with changing all instances of Events Calendar/Tickets Pro text “RSVP” to “Sign Up”:
    function tribe_custom_theme_text ( $translation, $text, $domain ) {

    $custom_text = array(
    ‘RSVP’ => ‘Sign Up’,
    );

    // If this text domain starts with “tribe-“, “the-events-“, or “event-” and we have replacement text
    if( (strpos($domain, ‘tribe-‘) === 0 || strpos($domain, ‘the-events-‘) === 0 || strpos($domain, ‘event-‘) === 0) && array_key_exists($translation, $custom_text) ) {
    $translation = $custom_text[$translation];
    }
    return $translation;
    }
    add_filter(‘gettext’, ‘tribe_custom_theme_text’, 20, 3);

    Please advise…thank you!

    #1347734
    Patricia
    Member

    Hey Chip,

    Thank you for reaching out to us!

    Did you check this thread? In that case Andras suggested to use this snippet to change the RSVP text:

    https://gist.github.com/andrasguseo/29903a974cb84060957881c17613c278

    To be able to change the ‘Confirm RSVP’ button text, you will need a template override (you will find further information in that thread).

    I hope this helps! Let me know if you need anything else in the mean time.

    Regards,

    Patricia

    #1347846
    Chip Cooper
    Participant

    thank you…I’ve added this code to the bottom of my functions.php file …but still seeing “RSVP”…see attached screen shot

    function tribe_custom_theme_text_with_context ( $translation, $text, $context, $domain ) {

    // Put your custom text here in a key => value pair
    // Example: ‘Text you want to change’ => ‘This is what it will be changed to’
    // The text you want to change is the key, and it is case-sensitive
    // The text you want to change it to is the value
    // You can freely add or remove key => values, but make sure to separate them with a comma
    // This example changes the label “Venue” to “Location”, and “Related Events” to “Similar Events”
    $custom_text = array(
    ‘RSVP’ => ‘Sign Up’,
    );

    // If this text domain starts with “tribe-“, “the-events-“, or “event-” and we have replacement text
    if( (strpos($domain, ‘tribe-‘) === 0 || strpos($domain, ‘the-events-‘) === 0 || strpos($domain, ‘event-‘) === 0) && array_key_exists($translation, $custom_text) ) {
    $translation = $custom_text[$translation];
    }
    return $translation;
    }
    add_filter(‘gettext_with_context’, ‘tribe_custom_theme_text_with_context’, 21, 4);

    #1348193
    Patricia
    Member

    Hi Chip,

    As I can see from your screenshot the code did work because the RSVP text above the total number of tickets available was changed to Sign Up, although this snippet won’t change the “Confirm RSVP” button indeed.

    I believe that in your specific case, since you want to change the text in multiple/different places, a template override would be the best option.

    Please access your site via FTP and copy the following file:

    wp-content/plugins/event-tickets/src/views/tickets/rsvp.php

    Paste it into:

    /wp-content/themes/[your-theme]/tribe-events/tickets/rsvp.php

    Open the file you just copied to your theme’s directory and modify lines you want. For instance, to change the text in the “Confirm RSVP” button, edit line 197.

    I hope this helps you get started, let me know if you have any other questions in the mean time.

    Regards,

    Patricia

    #1348998
    Chip Cooper
    Participant

    Hi…that helped with the button…but there are still instances of “RSVP” on the page…please advise.

    #1349138
    Patricia
    Member

    Hi Chip,

    This is happening because this specific text is generated by a different file (orders-link.php).

    To achieve what you want and customize this specific text, I would recommend you to use the a new template override.

    Please access your site via FTP and copy the following file:

    wp-content/event-tickets/src/views/tickets/orders-link.php

    Paste it into:

    [your-theme]/tribe-events/tickets/orders-link.php

    Open the file you just copied to your theme’s directory and modify lines 45 and 46 to achieve what you want:


    $message = sprintf( esc_html__( 'You have %s for this %s.', 'event-tickets' ), implode( __( ' and ', 'event-tickets' ), $counters ), $events_label_singular );
    $message .= ' ' . sprintf( esc_html__( 'View your %s', 'event-tickets' ), $this->get_description_rsvp_ticket( $event_id, $user_id, true ) ) . '';

    I hope this helps you! Let me know if you need anything else in the mean time and I’ll be happy to assist!

    Regards,

    Patricia

    #1360390
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Change all instances of RSVP to Sign Up’ is closed to new replies.