Posted: January 12, 2016 at 2:32 am
|
Hi Can anyone advise if it is possile to change the size and position of the Register Now button I am using it on this page http://www.bosworthsgc.co.uk/events/coach-trip-bbc-gardeners-world-live-18th-june-2016/ and would like to move the button under the ticket selector Thanks |
You can do that using CSS. The button has a class of ‘ticket-selector-submit-btn’ so you can add some CSS to change the style to however you prefer using that. For example floating the button to the left rather than the right: .ticket-selector-submit-btn { float: left; } I’m not sure how else you want to change the button but you can continue to add styles to that selector above. We recommend using either the My Custom CSS or Reaktiv CSS Builder plugins to add custom styles such as these. |
|
|
Hi Tony Thank you I have the Realktiv CSS Builder plugin installed, I assume I just add the above code into that and ADD ? The only other thing I would like to have done is increas the size of the button too – is that possible and could you advise what additional code I would use for that Thanks |
With Reaktiv you add your styles and click ‘Save CSS’ – http://take.ms/n7mcH You could try something like: .ticket-selector-submit-btn { float: left; padding: 25px 75px; font-size: 16px; font-weight: bold; } But it really depends on what your are looking for. |
|
|
Thank you for your help with this I am new to CSS – can you tell me what I would need to add to change it from Register Now to Book Now thanks |
You wouldn’t do that with CSS. CSS adds styles to the elements within the page, so you want to change the text within the element before its loaded. The easiest way to do that is to translate the text, I recommend using the custom function shown here: https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function You can add that to a Site Specific Plugin and then translate the string ‘Register Now’ to ‘Book Now’, like this: function mycustom_filter_gettext( $translated, $original, $domain ) { // This is an array of original strings // and what they should be replaced with $strings = array( 'Register Now' => 'Book Now', // 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', 'mycustom_filter_gettext', 10, 3 ); |
|
|
Thank you |
You’re most welcome, did you get it working? If your not sure of the above I can provide some additional details. |
|
|
Have moved it and changed the size – not 100% sure on how to change the wording Thanks |
The first step is create a site specific plugin, this is basically just a blank plugin that you can place any custom functions for that within. You do that by following the steps here: Site Specific Plugin Once you have that, you can just add that function I provided above to that plugin. That function will translate ‘Register Now’ to ‘Book Now’. I can place that code into an example plugin if you prefer? however you’ll get a better understanding of what is happening if you follow the link and create it yourself. |
|
|
Thanks Have done this and it all works ok – thank you On the Events Grid its still shows as Register Now – would you be able to tell me the function code I need to change this bit please Thanks again |
There’s 2 ways for that. The Event Grid uses the strig ‘Register Now!’ which can be added to the function above (not the ! makes this a different string) So you would add that string within the $strings array, meaning this:
becomes this:
(Original string to change on the left, translated string on the right) OR The [ESPRESSO_GRID_TEMPLATE] takes the ‘button_text’ parameter that allows you to change the text:
|
|
The support post ‘Changing the size and position of the "Register Now " button’ 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.