Home › Forums › Calendar Products › Events Calendar PRO › Removing "@" sign from shortcode event details display
- This topic has 4 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
November 11, 2015 at 3:25 pm #1024379
wplove
ParticipantI’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!
November 11, 2015 at 10:57 pm #1024457Brook
ParticipantHowdy 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
November 13, 2015 at 11:36 am #1025432wplove
ParticipantThanks 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
November 13, 2015 at 2:28 pm #1025487Brook
ParticipantFor 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
February 18, 2016 at 8:31 am #1075613Support Droid
KeymasterThis 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 ‘Removing "@" sign from shortcode event details display’ is closed to new replies.
