Home › Forums › Ticket Products › Event Tickets Plus › Tickets form on single-event.php
- This topic has 7 replies, 3 voices, and was last updated 10 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
July 14, 2013 at 10:33 pm #55139
jpfaraco
ParticipantI’ve upgraded to Events Calendar 3.0.1 and WooTickets 3.0, and am updating my template files.
My event page is composed of some of the metadata on the sidebar, and some on the main content area, so I can’t simply use tribe_events_single_event_meta(). I managed to individually place each element on the template using tribe_get_organizer(), tribe_get_start_date(), tribe_get_meta( ‘tribe_venue_map’ ), tribe_get_full_address( get_the_ID() ), and so on.Now I’m trying to show the tickets form on the event page, where I used to have tribe_get_ticket_form(). I see now this is done with do_action( ‘tribe_events_single_event_after_the_meta’ ), but I can’t understand where this is pulling the ticket form from, and why can’t I use the old tribe_get_ticket_form(), or a more direct way to show the tick form where I need it.
July 15, 2013 at 8:15 am #55194Barry
MemberHi jpfaraco,
Here’s a snippet that adds the ticket form to other views such as the list view. Of course, that isn’t quite what you want to do – but it shows how the form can be attached to an action and indeed you could potentially extract and use directly the very same callback:
TribeWooTickets::get_instance()->front_end_tickets_form()
Does that help at all here?
July 15, 2013 at 9:57 pm #55349jpfaraco
ParticipantThanks Barry ! I should read a little more about actions, since I’m sure it’s a good practice to use them instead of extracting the callback like I imagined.
Now, how can I customize the tickets form template without having to overwrite the tickets.php from the plugin ? Should I copy it into the theme folder, and if so, where to if not inside the tribe-events folder ?July 16, 2013 at 6:07 am #55383Barry
MemberRight now you should copy it to within a subdirectory of your theme called events:
wp-content/themes/YOUR_THEME/events/tickets.php
This is a bit different from other template overrides which as of 3.0 should be placed in a subdirectory of your theme called tribe-events … it’s possible this difference is due to an oversight – so, for that reason, I should make you aware that there is a possibility this will change in the future.
July 16, 2013 at 7:08 pm #55614jpfaraco
ParticipantThanks again Barry ! I couldn’t find this detail in the Themer’s Guide .. If that’s so, you should consider adding it to the documentation.
July 16, 2013 at 8:15 pm #55622Barry
MemberIndeed – in fact I should make you aware that we were discussing this and it is very likely that the next release will include a change where overrides for WooTickets should be placed in:
[your-theme]/tribe-events/wootickets/…
As per the themer’s guide – so that’s something to look out for, and that will also bring WooTickets into line with our other plugins.
August 19, 2013 at 8:05 am #61027Barry
MemberClosing this out since it’s been a while – and, as a final note, the above mentioned change is now in effect and things should work as described in the Themer’s Guide 🙂
July 7, 2015 at 6:27 am #979501Support 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 ‘Tickets form on single-event.php’ is closed to new replies.
