Support

Home Forums Event Espresso Premium Trying to change text on event page… Ticket options etc

Trying to change text on event page… Ticket options etc

Posted: August 12, 2016 at 3:33 am

Viewing 9 reply threads


Joe Mangrum

August 12, 2016 at 3:33 am

When viewing this page
http://www.clairescreativeadventures.com/classes/art-adventures-3-5-5-years/
I want to change the text on the grey bar to Registering For instead

these would also like to replace the text Goes on sale = Registration Begins:
Sale end= Registration Ends:


Tony

  • Support Staff

August 12, 2016 at 4:36 am

Hi there,

I want to change the text on the grey bar to Registering For instead

Turns out theres multiple grey bars on your event page, which one are you referring to?

these would also like to replace the text Goes on sale = Registration Begins:
Sale end= Registration Ends:

Is this front end or within the admin, or both? If you can add a screenshot that shows what you would like to change I can point you in the right direction.


Joe Mangrum

August 14, 2016 at 10:24 pm

Hi Tony,
Thanks and sorry for not being more specific in my request.

Below are two of the grey bars for “Ticket options” and “Event Details”

I would like to change these to “Registering For” and “Class Details”

Its for the public view and backend too I suppose..

ticket options bar

event details grey bar


Joe Mangrum

August 14, 2016 at 10:32 pm

The goes on sale and sale ends has become redundant since I’m not displaying event details or pricing


Joe Mangrum

August 14, 2016 at 10:50 pm

also the event location to “class Location”


Tony

  • Support Staff

August 15, 2016 at 6:10 am

Hi Joe,

For the front end the output is from your theme, you are using iced mocha on your site and there’s a couple of different way your can alter that text.

One way is to translate the text to output whatever else you prefer, note that ‘Ticket options’, ‘Event Details’ and ‘Event Location’ may be used in other locations which may be translated also but I’ve not found any that should cause any for the current version. You can do that using this:

https://gist.github.com/Pebblo/a68e8a151bd1df0288c45ddff585c300

Place that within the themes functions.php file or a Custom Functions Plugin.

The other is to create a child theme from Iced Mocha and edit the templates used to output the text, you can find a tutorial on creating a child theme here:

https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/

The templates you need to edit are:

content-espresso_events-details.php
content-espresso_events-tickets.php
content-espresso_events-venues.php

Either of those method should change the front end output.


Joe Mangrum

August 15, 2016 at 1:59 pm

So that helped with the class details and the location but not the ticket options part??

I added to my current plugin customization

here is the full code of that plugin :
<?php
/*
Plugin Name: Site plugin for clairescreativeadventures.com
Description: Site specific code for clairescreativeadventures.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
function ee_proceed_to_button( $submit_button_text, EE_Checkout $checkout ) {
if ( ! $checkout instanceof EE_Checkout || ! $checkout->current_step instanceof EE_SPCO_Reg_Step || ! $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
return $submit_button_text;
}
if ( $checkout->next_step->slug() == ‘payment_options’ ) {
$submit_button_text = ‘Finalize Pre-Registration’;
}
return $submit_button_text;
}

add_filter ( ‘FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text’, ‘ee_proceed_to_button’, 10, 2 );

function ee_register_now_button() {
return ‘Pre-Register’;
}

add_filter (‘FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text’, ‘ee_register_now_button’);

function tw_custom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Ticket options’ => ‘Registering For’,
‘Event Details’ => ‘Class Details’,
‘Event Location’ => ‘Class Location’,
// Add some more strings here
);

// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}

return $translated;
}

add_filter( ‘gettext’, ‘tw_custom_filter_gettext’, 10, 3 );

/* Stop Adding Functions */

options


Joe Mangrum

August 15, 2016 at 2:03 pm

Aha… I noticed the code you wrote had “options” instead “Options” capital O so I changed it and it works

Thanks so much


Tony

  • Support Staff

August 15, 2016 at 5:49 pm

Apologies, my mistake. I’m glad you got it working and I have also fixed my code in the gist.

Just for future reference when posting code its much better to use either something like http://pastebin.com/ or create a gist and post the link here for us to view as the forum adds styling to the code 🙂


Joe Mangrum

August 15, 2016 at 8:40 pm

got it… thanks

Viewing 9 reply threads

The support post ‘Trying to change text on event page… Ticket options etc’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso