Support

Home Forums Event Espresso Premium Calender widget "register now" button text filter

Calender widget "register now" button text filter

Posted: January 30, 2018 at 5:55 pm

Viewing 1 reply thread


REAIE

January 30, 2018 at 5:55 pm

I need to change the text in the “Register Now” button which displays inside the popup that displays when visitors click on an event in the EE calender widget. It’s hard to describe without uploading an image! Is there an example of a filter I can use to change this text?


Tony

  • Support Staff

January 31, 2018 at 3:04 am

Hi there,

For screenshots you need to host the image and post a link here for us to view, we have some examples of how you can add screenshots here:

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

To change the ‘Register Now’ text on the calendar you have a couple of options, you can either translate that string to something else using one of the methods shown here:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/

Or, there is a filter within the Calendar that allows you to change the button text:

apply_filters(                  
    'FHEE__EE_Calendar__get_calendar_events__tooltip_reg_btn_html',
    $tooltip_reg_btn_html,
    $event,
    $datetime
);

When using that filter it’s the full HTML for the reg now button so it would be expected that you rebuild the HTML yourself, see:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-calendar/tw_calendar_tooltip_reg_btn_html.php

However you can use str_replace() to replace ‘Register Now’ with whatever you prefer, another example:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-calendar/tw_calendar_tooltip_reg_btn_html_str_replace.php

You can add either of those to a Custom Functions Plugin on your site.

Viewing 1 reply thread

The support post ‘Calender widget "register now" button text filter’ 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