Help Modifying month/single-event.php

Home Forums Calendar Products Events Calendar PRO Help Modifying month/single-event.php

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1201605
    Ben
    Participant

    Hi 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

    #1201768
    Andras
    Keymaster

    Hey 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/functions

    Let me know how that works out for ya.

    Cheers,
    Andras

    #1201906
    Ben
    Participant

    Thanks Andras,

    The functions guide was exactly what I was looking for.

    Appreciate the help.

    #1202188
    Ben
    Participant

    Hi 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

    #1202504
    Andras
    Keymaster

    Hey 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,
    Andras

    #1203110
    Ben
    Participant

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

    #1203740
    Andras
    Keymaster

    Hi 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,
    Andras

     

    #1204697
    Andras
    Keymaster

    Hi 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

    #1204701
    Ben
    Participant

    Hi 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

    #1206131
    Andras
    Keymaster

    Hi 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,
    Andras

    #1206298
    Ben
    Participant

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

    #1206318
    Andras
    Keymaster

    Hi 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,
    Andras

    PS: 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-calendar

    PS2: 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!

     

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Help Modifying month/single-event.php’ is closed to new replies.