Get rid of '@' before the time of an event

Home Forums Calendar Products Events Calendar PRO Get rid of '@' before the time of an event

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #64444
    Heinz Duschanek
    Participant

    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.

    #64573
    Barry
    Member

    Hi 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?

    #64622
    Heinz Duschanek
    Participant

    Thanky 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.

    #64639
    Heinz Duschanek
    Participant

    Forgot to add the function: it’s tribe_events_list_the_date_headers()

    #64651
    Barry
    Member

    You 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!

    #64667
    Heinz Duschanek
    Participant

    It 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.

    #64676
    Barry
    Member

    I 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.

    #64701
    Heinz Duschanek
    Participant

    YOU’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.

    #64702
    Barry
    Member

    Excellent, happy to help πŸ™‚

    #980649
    Support Droid
    Keymaster

    This 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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Get rid of '@' before the time of an event’ is closed to new replies.