Posted: May 7, 2018 at 4:11 am
|
Hello, I’ve installed the ultimate members plugin to launch our membership program. I managed to make it work with Event Espresso so far. Now I’m trying to change the default “Free ticket is available to members only message” for both non logged in users and also logged in users who do not have a member status yet. I would like to show: Click here to become a member “Click here” linked to my become a member page. I checked the following threads but not sure how to add a custom link to the message. https://eventespresso.com/wiki/wp-user-integration/#custom_restricted_ticket_message https://eventespresso.com/topic/wp-user-change-is-available-to-members-only/ Thanks |
|
I would also like to hide the Address section for non-logged in and logged in but not a member users, if possible. |
Hi there,
That’s actually exactly what you need, the only difference being the URL. Here’s another example: https://gist.github.com/Pebblo/783dc4f9f43b9780d860112817edfd6d You need to return the correct link yourself when using the functions above, how you pull the correct link is up to you. In my example you can change:
to whichever URL you want the user to go to, or if ultimate member has a function to return a specific registration page you can use that, it all depends on what you want to do. For example you could just use something like this: https://gist.github.com/Pebblo/783dc4f9f43b9780d860112817edfd6d#file-example2-php Change the URL to whatever you want to use and that should be it.
We don’t currently have an option to hide specific question groups based on the user. |
|
|
Hi Tony, super, that worked, thank you. |
|
sorry, just one more question, I just realized this text also shows if I add a members only discounted ticket to a normal event. How can I add the price of the ticket to this text? XX Ticket is reserved for members where XX would be either “Free” or the discounted price. |
It’s not really clear above if ‘XX’ would be the price, or the ticket name as that could be either. So do you want to display the ticket name there or the price? |
|
|
The price please. Would be good to know how to show the ticket name as well, just in case, but probably won’t need it. |
It all already there in the gist 🙂 This one: https://gist.github.com/Pebblo/783dc4f9f43b9780d860112817edfd6d#file-example-php
So for: You change to
Make sense? |
|
|
Yes, managed it!:) Any idea why this variable is pulling the price in this weird format? (374 (CHF)) instead of just 374? |
Because that’s how the default message outputs the price – http://take.ms/ZpghV You can change it for raw output by using |
|
|
Thanks Tony. How could I change it so that it shows on the 374(CHF) without the extra parentheses like here: |
You use That will use the same formatting the ticket selector uses to display the price. |
|
|
Sorry, I add this as a separate line or replace $ticket->price(), ? I tried the latter and I got an error |
Can you post the code you used to a gist/pastbin so I can view it? |
|
|
Sure, here you go: |
Line 6 you should change from:
to
That should then work. |
|
|
I just did, strangely it still shows only the number: https://dev2.genevaphotoclub.com/events/weekday-intermediate-evening-5x2hrs-may-28-jul-2/ |
That’s odd. You should only have one function changing that text, can you double check there’s not another function using the previous code? I just tested the code you are using with my change: http://take.ms/jisVY |
|
The support post ‘Members only event : 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.