How to hide 'session' label in event title from Upcoming events gadget
When you create multi-session event, the Upcoming event gadget displays session number in the title of event.
We received several requests from users to hide this. As quick solution you can use the following JS code:
<script type="text/javascript">
$(function()
{
if( $('.WaGadgetUpcomingEvents').size() )
{
$('.WaGadgetUpcomingEvents a:contains("(session")').each(function()
{ var text = $(this).html(); var newText = text.replace(/(\s+(session[\w\s]+))/, ""); $(this).html(newText); }
);
}
});
</script>
-
Kat commented
Is there a way to only show each event? The code works, but still shows the sessions per day. I'd rather show just the events themselves
-
Walt Bilofsky commented
It just worked for me.
I don't know why, but the session number has never showed in our Upcoming Events gadgets. But when I added a new UE gadget, it was there. And when I added this global javascript, it went away.
We're using Skyline Downtown theme, if it matters.
-
Ed commented
Does this work still? I put this in global javascript and the gadget still says blah blah event(session x of y)....
-
Michele commented
So how would I change the word "sessions" on my Events details page (when clicking on "Show details" - and not on the Upcoming event list) where it says, for example "5 sessions" - I want to change it to "5 payments".
There are threads that talk about a "wish" for payment plan types of registrations and this is my work around - using sessions just to remind them and then sending them via their login where they can pay their next payment. A basketball sports team using Wild Apricot uses the donation gadget for their partial payments.
-
klm commented
How about some code so that only the first session of a multi-session event is shown on the Upcoming events gadget?
-
Schneibs commented
Thanks for this, much appreciated!
-
Dawn, this code is inserted to Global JavaScript. You can find this page here: Settings -> Site settings.
It applies to the 'Upcoming events' gadget -
Dawn commented
Where is this code inserted? On the Upcoming Events Gadget or in the Event Calendar?