Support

Home Forums Event Espresso Premium Can I change the button wording for a specific event

Can I change the button wording for a specific event

Posted: August 11, 2021 at 1:56 am

Viewing 10 reply threads


adoreyourpelvicfloor

August 11, 2021 at 1:56 am

Hi

We have a different set up for one of our events where we have to change the wording slightly on the button: Instead of ‘view details’, we would like it to read ‘register now’. Can I do this for a specific event?

I read this https://eventespresso.com/topic/changing-default-wording-in-several-spots/ but its not clear where to add the

[ESPRESSO_EVENTS_TABLE_TEMPLATE sold_out_button_text='View Details']

Please could anyone advise? I welcome any help.


Tony

  • Support Staff

August 11, 2021 at 6:43 am

Hi there,

The above shortcode is for outputting the table view template from this add-on:

https://eventespresso.com/wiki/events-table-view-template-add-on/

You don’t currently have that add-on on your license so I’m assuming you aren’t using it?

Can you link me to the specific page you want to change the button, please? It’s likely possible to do with a snippet but I need to know which output you are using to know for sure.


adoreyourpelvicfloor

August 11, 2021 at 7:10 am

Thank you
Sure its https://adoreyourpelvicfloor.co.uk/book-online/


adoreyourpelvicfloor

August 11, 2021 at 7:43 am

The thing is, I just want to be able to change the button name, not list tables.


Tony

  • Support Staff

August 11, 2021 at 7:48 am

Thank you, so thats the default event list and yes you can change the text for specific events, but you need a snippet to do it, for example:

https://gist.github.com/Pebblo/6ca533539b2ed37ed88801825fdd2f2f#file-functions3-php

You can add that third function to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Then on the event(s), you want to to display a different string on you create a custom field with the name ee_custom_view_details_text and the value set to the string you want to use in place of the default.

So it works something like this, default, no custom field:

https://monosnap.com/file/7FbqaiiPBZjNSNF8DW8OjbJw8cveob

After setting a custom field:

https://monosnap.com/file/xCBTu2vdMS09e8cm2yD17ttzMDeTgc

Does that work for you? With a little more custom code you could always change the text to a hardcoded string when the event is set to a specific category for example.


adoreyourpelvicfloor

August 12, 2021 at 1:45 am

Ok I got most of that, but un clear on this bit:

Then on the event(s), you want to to display a different string on you create a custom field with the name ee_custom_view_details_text and the value set to the string you want to use in place of the default.

So it works something like this, default, no custom field:

Where do I add this? The short code? Where? And what am I adding? I am assuming php?

I do know PHP but I am a very ‘monkey see, monkey do’ learner. Basically clear instruction I can do. ๐Ÿ™‚


Tony

  • Support Staff

August 12, 2021 at 2:06 am

It uses a custom field in from within the event itself to know what to display for that text, so you need set the custom field on the event itself.

Go to Event Espresso -> Events -> {edit the event in question}

Find the ‘Custom Fields’ section within that event, it’s the section shown on the right of this screenshot:

https://monosnap.com/file/7FbqaiiPBZjNSNF8DW8OjbJw8cveob

In the name field set it to ee_custom_view_details_text

In the value, set the button text you want to use, so in this case ‘Register Now’.

Click ‘Add Custom Field’.

Update the event.

With the above snippet in place the event you edited should now show ‘Register now’ in pace of ‘View Details’.


adoreyourpelvicfloor

August 12, 2021 at 4:58 am

This reply has been marked as private.


Tony

  • Support Staff

August 12, 2021 at 5:11 am

Custom fields are a default feature within WordPress, the snippet I gave you uses them, but it doesn’t enable them as they are usually enabled by default.

When you edit the event look at the top right of the page, there should be a ‘Screen options’, click on that.

Can you see a Custom Fields checkbox listed there? If so, is it checked?

Like this: https://monosnap.com/file/5uVYTk2G1LPwiZRKEDbrDKcaWRqjx4


adoreyourpelvicfloor

August 12, 2021 at 5:28 am

Ah! Found it. it wasn’t on the side for my setup – it was at the bottom. I have cracked it and it works.

Thank you soooo much. Its very appreciated.


Tony

  • Support Staff

August 12, 2021 at 6:01 am

You’re most welcome, I’m glad it worked for you ๐Ÿ™‚

Viewing 10 reply threads

The support post ‘Can I change the button wording for a 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