Home › Forums › Calendar Products › Events Calendar PRO › Help Modifying month/single-event.php
- This topic has 12 replies, 3 voices, and was last updated 9 years, 5 months ago by
Ben.
-
AuthorPosts
-
December 5, 2016 at 9:16 am #1201605
Ben
ParticipantHi there,
I’m enjoying the plugin so far!
I’d like to modify the way each event is displayed on the calendar (month) view… Specifically I’d like the add the start and end times.. I’ve read the instructions on that template about the json data etc but I’m not 100% sure how to proceed..
I’ve copied the month/single-event.php to mytheme/tribe-events/month/single-event.php and it seems to be working in that I can add basic HTML and it is displayed.
I don’t think the json objects apply to that template as it isn’t mentioned in the instructions I’m pretty sure I’d need to grab the variables from PHP somehow… However I don’t know what PHP variables to use or how otherwise to interrogate Events Calendar for that data… Could someone point me in the right direction?
Thanks
December 5, 2016 at 2:35 pm #1201768Andras
KeymasterHey Ben,
Thanks for using our plugins and for reaching out!
You are on the right path. Though I’m not sure you will need any json data, you should be able to manage without that.
The template override you did is a good start.
In that file you will also need to get the start time of the event. For this you can use the function tribe_get_start_time(). Just assign it to a variable up top.
Then you will need to print it out, basically echo the variable somewhere around line 196-197 or so.
Also here are some resources for you which might help you in customization later on:
https://theeventscalendar.com/knowledgebase/themers-guide/
https://theeventscalendar.com/knowledgebase/template-overview/
https://theeventscalendar.com/functionsLet me know how that works out for ya.
Cheers,
AndrasDecember 6, 2016 at 12:42 am #1201906Ben
ParticipantThanks Andras,
The functions guide was exactly what I was looking for.
Appreciate the help.
December 6, 2016 at 10:00 am #1202188Ben
ParticipantHi Andras,
I’ve almost got there with my customisations now.. Your link was exactly what I needed.
I was just wondering if there is a PHP code to get the remaining number of tickets.. I can’t find one in the functions list but I might be missing something.
Appreciate the help as always
December 7, 2016 at 2:12 am #1202504Andras
KeymasterHey Ben,
There is no direct function for that unfortunately.
You can check in this file, on line 61 an example on how we show the remaining stock on the single event page:
wp-content\plugins\event-tickets\src\views\tickets\rsvp.php
Does this help?
Cheers,
AndrasDecember 8, 2016 at 7:35 am #1203110Ben
ParticipantThanks Andras,
I’m struggling to really understand enough of what’s going in that RSVP file to know if it helps!
I’m struggling to bring the ticket stock over in any way but it’s definitley a lack of skill on my part so I understand if you can’t help with this customisation further.
December 9, 2016 at 2:57 am #1203740Andras
KeymasterHi Ben,
No worries. Gimme some time to look into that, maybe pull in some extra muscle. I’ll let you know soon what can be done.
Cheers,
AndrasDecember 12, 2016 at 7:19 am #1204697Andras
KeymasterHi Ben,
Hope you had a great weekend!
Where do you exactly want the remaining ticket numbers to show up?
The show up by default on the single event page where you can choose how many tickets you want to purchase. Do you want to show it anywhere else? A screenshot would also help.
Thanks for clarifying
Cheers,
Andras
December 12, 2016 at 7:26 am #1204701Ben
ParticipantHi Andras,
Thanks for getting back to me… i’d like to show the number of tickets below each event on the calendar view.. We’re using the plugin to sell tickets for workshops so it would be nice for customers to be able to see how many places are available at a glance from the calendar view without clicking through.
I attached a screenshot with a highlight where I’d like “10 places remaining” or something similar to show up.
Ben
December 14, 2016 at 1:25 pm #1206131Andras
KeymasterHi Ben,
Thanks for your patience and followup.
I looked at the issue and would require quite some work. Unfortunately as per our support policy we are limited in doing and supporting customization. This is about as far as I can take you, from here you will have to take the reins.
If you need some expert help here is a list of developers from the community who should be able to help with your needs:
https://theeventscalendar.com/knowledgebase/find-a-customizer/Thanks for your understanding!
Cheers,
AndrasDecember 15, 2016 at 1:10 am #1206298Ben
ParticipantThanks Andras,
I understand and appreciate you trying to find a solution… I’m more than happy to find someone to customise it for us.
Thanks again for taking the time to try and help.
December 15, 2016 at 2:27 am #1206318Andras
KeymasterHi Ben,
Sure thing, you are welcome!
I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic in the forum and we will help you out.
Good luck with your project!
Cheers,
AndrasPS: If you like our plugin, and you didn’t yet do so 🙂 we would be happy to receive a review in the wordpress.org repository. Thanks!
https://wordpress.org/support/view/plugin-reviews/the-events-calendarPS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!
-
AuthorPosts
- The topic ‘Help Modifying month/single-event.php’ is closed to new replies.
