Support

Home Forums Event Espresso Premium change register now text for specific event

change register now text for specific event

Posted: July 17, 2018 at 1:17 pm

Viewing 2 reply threads


pmoise

July 17, 2018 at 1:17 pm

Hello,
Is it possible to customize the “register now” text on the button for one specific event. I already found the postid.

Thanks


Josh

  • Support Staff

July 17, 2018 at 1:47 pm

Hi,

Yes this is possible. You drop this bit of custom code into a functions file:

add_filter(
    'FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text',
    'my_custom_one_off_event_button_text',
    10,
    2
);

function my_custom_one_off_event_button_text($text, $event) {
    if($event instanceof EE_Event){
        $evt_id = $event->ID();
        if($evt_id == 12345) {
            $text = 'Custom Text Goes Here';
        }
    }
    return $text;
}

In the above, you’ll set the post ID to the $evt_id variable and replace ‘Custom Text Goes Here’ with your custom text.

You can add the above to a functions plugin or into your WordPress child theme’s functions.php file.


pmoise

July 17, 2018 at 2:11 pm

Thank you Josh, this just work perfectly !!

Viewing 2 reply threads

The support post ‘change register now text for specific event’ 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