Posted: September 13, 2021 at 6:43 pm
I saw this post https://eventespresso.com/topic/change-goes-on-sale-text/
Is there a list of functions somewhere? I couldn’t find this by searching documentation.
I saw other posts saying to translate from English to English. I’m really hoping for an easier way to do this since it’s so little we want to change.
When I added this code to my functions.php file the site said “There has been a critical error on this website.”
I’m not a coder and maybe that was incorrect (it seemed templated). But any guidance you can offer would be helpful, thank you.
Which specific ‘Upcoming’ and ‘on sale’ string are you looking to change?
To clarify in case it isn’t clear, you can’t change ALL instances of a string by using a partial translation. Meaning although you mentioned you want to change ‘on sale’, is that to change the ‘Goes on sale’ string? As you’d need to target that whole specific string and just ‘on sale’.
Copying the code from the forums can be tricky as there’s formatting here which will then throw a fatal error as above.
If you let me know the specific strings you are looking to change I’ll help point you in the right direction for doing so 🙂
Hello this is in follow up to https://eventespresso.com/topic/list-of-filter-functions-to-change-text/
Sorry we can not reply fast enough to the time you need to close topics. We are mostly volunteer run and have a contractor working with us who is not full time with us. We wrote about this before. It would be helpful if we could re-open threads on our end, or have more time to reply.
Anyway, in follow up to the previous question,
We would like to change all of the instances of “Upcoming” on the events to “Registration Open.” In other words, on the archive pages of events. I don’t have an example to show you now because due to covid, we don’t have in-person events right now (only online). They all say “expired.” But where it says “expired” is where it would normally say “Upcoming” if the event were “Upcoming”. Here is an example: https://cloudup.com/cNZM5ovzVhX
The word “on sale” in order to buy a ticket to an event sounds like a discount. We just want it to say “Log in to access” since it applies to our member tickets: https://cloudup.com/cVBBA5XgB-K
Thank you very much for all your help.
No apology needed, just open up a new thread with reference to the old one and we can re-open and merge (which I have done here).
Threads automatically close after 2 weeks of no activity from the last reply date, that value is set globally so I can’t change that to give you specifically more time to reply.
To explain a little on why threads close, we try to keep threads on a specific topic and if we then allow users to reopen them again it would be pointless having them close at all. We’ve seen in the past some threads running across multiple different issues, mixing and matching problems/solutions and cross-referencing issues from earlier which just gets confusing for all in the end. So we prefer to keep threads on topic and handle each specific issue within that thread as much as we can and then close it, users being able re-opening threads and adding new issues to current threads just creates more confusion and more work on our end for little benefit.
Ok, so that’s the event status banner and I should add here that an ‘Upcoming’ event may not always have tickets on sale which means ‘Registration Open’ would not be correct.
Changing that status can be done using a snippet like this:
The others can be removed if preferred but the above is what set the status string for ‘Upcoming’.
That’s using the ticket ‘on sale’ status, you could use the above snippet to change that by changing the strings for singular and plural like above:
This would go in as part of the above snippet and change the ‘On Sale’ status sitewide, however, as you’ve mentioned you want to use ‘Log in to access’ I’m assuming you want to only change that specific string in the image and we have a filter for that:
Here is an example of using that filter to change the text:
Hello thank you for your help and explanations.
I tried this bit of code in functions.php:
–> the above changed nothing.
As well as this:
–> The above resulted in https://cloudup.com/c9fg-o9I44Q
I’m sorry I’m not a full-on coder like this. Can you help us solve this?
Then, I tried this bit of code:
It removes the entire line of member pricing ticket, and replaces it with the text above (i.e. to say “Click here to become a member.”) We need the ticket and everything to stay there, but we want the word “on sale” to change to “log in to access” if it requires that to be able to purchase it.
Here is a screenshot: https://cloudup.com/cQAngMcVTB4
Can you help us with this also?
This is what it looks like without any code added to the functions.php file https://cloudup.com/ckkU6R4mVJ8
Thank you again, we really appreciate it.
Nevermind about changing “on sale”. I figured out the other example in the link you sent does work. I used it as follows:
The thing I just can’t understand is why, if I move
I’m still having trouble with the “Upcoming” message.
Thank you again.
Apologies, as you were asking for a list of filters I assumed you were familiar with using them so didn’t go into details.
When using a filter you are basically given ‘something’ passed into the filter which you can then change and return back so that it uses your changes. So for changing ‘upcoming’ to ‘registration open’ you need to change the values and then return the array.
Something like this:
Note that Event Espresso automatically adds capitalization when needed so you can use all lower case.
I’m not sure I follow, but to explain a little more on how the above works the sprintf() function takes a string and then replace any ‘placeholders’ within that string with the values passed to it.
So my function has:
So now knowing how the above function works, you know the string looks more like:
(I’ve skipped the full URL in the above example, but I think it shows enough to see what is happening)
So if you just want the full string to be strong use the place holders in the correct locations to do that correctly like this:
Does that help?
The support post ‘list of filter functions to change text?’ 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.