Removing "@" sign from shortcode event details display

Home Forums Calendar Products Events Calendar PRO Removing "@" sign from shortcode event details display

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1024379
    wplove
    Participant

    I’m using the following shortcode to output a list of times for a events in an event category:
    [ecs-list-events cat=’mincha’ limit=’5′ eventdetails=’true’ contentorder=’date, eventdetails’]

    The content it generates looks like this:
    “November 11 @ 4:30 pm EST”

    I would prefer it read a little more cleanly:
    “November 11 – 4:30 pm” or “November 11 at 4:30 pm”

    Is there a way I can modify the output of the shortcode and put it in my child theme so it will be update-safe? I want to remove the timezone and modify the “@” sign.

    Thank you!

    #1024457
    Brook
    Participant

    Howdy WP Love,

    You can definitely modify that. It shares the same template as the widgets though, so if you were hoping to modify the shortcode and not the widgets, it will be a very in-depth modificaiton.

    To modify them both you will need some knowledge of PHP and theming. First familiarize yourself with our Themer’s Guide. You will want to create a theme override for /wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules/single-event.php. Then you can modify the line which calls tribe_events_event_schedule_details() to be something custom. Do not, that the function tribe_events_event_schedule_details() actually has quite a bit of logic behind it to account for events which span multiple with and without times, and events with no end time. You may need to recreate this entire logiv in your modification.

    If you don’t have a goodly bit of knowledge in PHP, then this modification is probably not possible. 🙁

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1025432
    wplove
    Participant

    Thanks for the lead on this. To give me a boost, can you tell me where the original tribe_events_event_schedule_details()
    code is located? I then can copy it and edit as needed in my customization. I see the code calls it in the single-event.php file, but I’m not sure of its location.

    Thanks,

    Eric

    #1025487
    Brook
    Participant

    For sure, Eric. That function is found in /wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php around line 1066. It sounds like you are planning to copy/paste it, then rename it. That’s a great idea, it should put you well on your way.

    Let me know if you have any other questions. Cheers!

    – Brook

    #1075613
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Removing "@" sign from shortcode event details display’ is closed to new replies.