Home › Forums › Calendar Products › Events Calendar PRO › Get rid of '@' before the time of an event
- This topic has 9 replies, 3 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
September 4, 2013 at 3:55 am #64444Heinz DuschanekParticipant
Hello,
can someone please list the code (filter) which gets rid of the ‘@’ separating date from time in the function tribe_events_event_schedule_details()? Or give a more specific hint on how to do that using a WordPress filter?
Thank you in advance.September 4, 2013 at 3:51 pm #64573BarryMemberHi Heinz!
Please familiarize yourself with our Themer’s Guide (if you haven’t already done so) to learn about template overrides, as that is the safest way to make changes such as these. Basically though, you could override single-event.php and find this piece of code:
echo tribe_events_event_schedule_details();
If all you want to do is remove the @ character then changing the above code to something like this should do the trick:
echo str_replace('@', ' ', tribe_events_event_schedule_details());
Does that help at all?
September 5, 2013 at 12:59 am #64622Heinz DuschanekParticipantThanky you Barry, that did it. I am familiar with the Themers guide, but I was hoping for a more fancy solution using filters, since I cannot use this for as the date is obviously written directly within that function.
September 5, 2013 at 5:14 am #64639Heinz DuschanekParticipantForgot to add the function: it’s tribe_events_list_the_date_headers()
September 5, 2013 at 6:06 am #64651BarryMemberYou could use a filter to do the same thing – in this case, the tribe_events_event_schedule_details filter – however I’m not sure there is a particular benefit to doing so in this case.
Forgot to add the function: itβs tribe_events_list_the_date_headers()
Not quite sure what you’re asking with regards to the above function, can you clarify and/or break the question out into a separate thread if it’s essentially a different topic from the first one?
Thanks!
September 5, 2013 at 6:52 am #64667Heinz DuschanekParticipantIt was the same thing, getting rid of the @ before the time. But using the template override solved it for the main content areas. Still unsolved for the widget “Next events”, but anyway. Not so important.
September 5, 2013 at 7:06 am #64676BarryMemberI do apologize Heinz, I see what you mean now. What about a snippet like this one (which uses a filter as you suggested)? It should remove @ symbols in the events list widget – I think that is what you mean by the “Next events” widget – as well as in list view.
The only word of caution is that it doesn’t discriminate between those @ characters used to separate dates and times and any others that might be present, but in most cases it should be fine.
September 5, 2013 at 7:57 am #64701Heinz DuschanekParticipantYOU’RE THE MAN, BARRY! That’s it! Solved, and I am as happy as happy I can be π
Yeah, it’s the events list widget, but here I see and use the German translations.September 5, 2013 at 8:07 am #64702BarryMemberExcellent, happy to help π
July 7, 2015 at 6:27 am #980649Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Get rid of '@' before the time of an event’ is closed to new replies.