Home › Forums › Ticket Products › Event Tickets Plus › Help with Custom Template – Pro Shorcodes – tribe_events_list category
- This topic has 7 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
February 9, 2016 at 7:23 am #1070278
Lady Berry
ParticipantHi,
So following on from a previous support thread:
I have a couple more questions π
1. Is it possible to add the Month to the date section of the Pro Shortcode Template – tribe_events_list category ?
2. Is it possible to add the ticket price beneath my Excerpt that I have added?
Thanks in advance
BenFebruary 9, 2016 at 7:53 am #1070296Lady Berry
ParticipantOK, I have answered number 1: by adding
<span class=”list-dayname”><?php echo apply_filters( ‘tribe-mini_helper_tribe_events_ajax_list_dayname’, date_i18n( ‘F’, $postDate ), $postDate, $mini_cal_event_atts[‘class’] ); ?></span>
to my custom template- THEME/tribe-events/pro/widgets/modules/single-event.php
For reference to anyone else who is interested, I found the date masks here:
https://codex.wordpress.org/Formatting_Date_and_TimeFebruary 9, 2016 at 8:21 am #1070328George
ParticipantHey @Ben,
Thanks for reaching out. We unfortunately cannot help with customizations. Please see this article for more information β https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/
I’m sorry to disappoint! If other support-related questions arise, don’t hesitate to open a new thread any time.
Now, before closing this thread, I wanted to touch on your Question #2 since it seems that you’ve already answered your own Question #1. You ask:
2. Is it possible to add the ticket price beneath my Excerpt that I have added?
Yes, it is possible to do this. You would need to enter the function tribe_get_formatted_cost() wherever you want the event cost to be displayed in your templates.
I hope this information helps!
β George
February 9, 2016 at 9:18 am #1070358Lady Berry
ParticipantThat is amazing – thank you so much. Im really sorry for asking an inappropriate question however am so grateful that you pointed me in the right direction really really appreciated.
Im guessing this is also an inappropriate question but if at all possible do you know if it is possible to add logic to show when a events tickets are sold out (on the same template)?
EDIT: I have found the function
tribe_tickets_get_ticket_stock_messagecould you show me how i use this in the template ie is it:
<?php echo tribe_tickets_get_ticket_stock_message() ?>Really appreciate all your help, you guys go above and beyond with support.
Ben
-
This reply was modified 10 years, 2 months ago by
Lady Berry.
February 10, 2016 at 10:14 am #1070931George
ParticipantHey @Ben,
Thank you for the kind words. Your questions are indeed outside the scope of support we can provide, so I’m sorry to admit that I will not be able to help with your code-related questions.
When it comes to how a function is used, I would recommend using a text editor that lets you “search in folder” βΒ then, open up the plugin code and search in its plugin folder for that function name. This will search all of the plugin code files and reveal where the function is used, so you can see how it’s used and then just replicate that method with our own tweaks.
For example, the function you asked about here is used like this:

Here is the full file path to where the above code is copied-and-pasted from:
wp-content/plugins/the-events-calendar/vendor/tickets/src/admin-views/attendees.php
I genuinely wish you the best of luck with your customizing!
Thank you,
GeorgeFebruary 15, 2016 at 10:33 am #1073362Lady Berry
ParticipantHi,
Thanks for the response – Im guessing $ticket is the ticket ID/reference for the ticket that the stock message is required for.
When using the custom template “single-event.php” how is it possible to pass $ticket (or equivelent) to the function – tribe_tickets_get_ticket_stock_message()
apologies if this is an unsupported question π
February 15, 2016 at 12:02 pm #1073395George
ParticipantHey @Ben,
You may be able to successfully retrieve tickets by using code like this:
$woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
$tickets = $woo_tickets->get_tickets( get_the_ID() );if ( ! empty( $tickets ) ) {
foreach ( $tickets as $ticket ) {
// Do things with $ticket.
}
}Your question IS unsupported. All of your questions in this thread are π I have tried to help despite that fact and hope I have! However, at this point I will now have to close this thread because we cannot keep fielding unsupported questions.
I do genuinely wish you the best of luck with your customizations.
Sincerely,
GeorgeMarch 1, 2016 at 8:35 am #1083912Support 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. -
This reply was modified 10 years, 2 months ago by
-
AuthorPosts
- The topic ‘Help with Custom Template – Pro Shorcodes – tribe_events_list category’ is closed to new replies.
