Home › Forums › Calendar Products › Events Calendar PRO › Modifying output of "tribe_get_ticket_form"
- This topic has 8 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
February 8, 2013 at 6:58 pm #32363
Joe
ParticipantHi there,
Using Events Calendar Pro and WooTickets, I’m pulling events in another template using a custom loop:
$classargs = array(
‘post_type’ => ‘tribe_events’,
‘posts_per_page’ => 3,
‘meta_key’=>’_EventStartDate’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘DESC’
);
$classloop = new WP_Query( $classargs );
?>and I’ve taken the following from (events) single.php:
tribe_get_ticket_form();
This works great, however it also outputs other items that I don’t need, such as the price and the title again. I really just need the quanity and the “Add to Cart” items.
Since I’d rather not just hide it with css (display:none;), Is there a place I can either duplicate this function and modify the output, or should I be going about this a different way?
I do see the output is being generated from tickets.php, but i don’t want to mess with that template.
Thanks!
February 9, 2013 at 5:02 pm #32382Jonah
ParticipantHi Joe,
All you have to do is make a copy of /wp-content/plugins/wootickets/views/tickets.php and place in an ‘events’ folder in your theme. Then you can make any changes to markup/placement that you want. That would be the best way to modify what is being displayed.
Does that help?
– Jonah
February 10, 2013 at 9:14 am #32394Joe
ParticipantHey Jonah,
My only issue with that is I would like to have 2 seperate outputs (leave the way it is for single.php), but then in my custom template I have a different markup/placement. (For example: tickets2.php).
Thanks for responding so quickly!
February 10, 2013 at 4:21 pm #32398Jonah
ParticipantHey Joe,
Gotcha. What about putting some conditional code within tickets.php for your custom template? if(is_page(‘about’) {} … ?
– Jonah
February 11, 2013 at 10:47 pm #32482Joe
ParticipantWow, perfect. Thanks Jonah, I don’t know why I didn’t think to do it that way. I think i’m so used to grabbing little raw functions here and there for my outputs that didn’t even cross my mind that a conditional would work in that file.
Life saver, thank you again.
February 11, 2013 at 10:47 pm #32483Joe
ParticipantWow, perfect. Thanks Jonah, I don’t know why I didn’t think to do it that way. I think i’m so used to grabbing little raw functions here and there for my outputs that didn’t even cross my mind that a conditional would work in that file.
Life saver, thank you again.
February 12, 2013 at 3:32 pm #32553Jonah
ParticipantHi Joe, glad to hear that works for you. So are you all set here? Can I close this out?
– Jonah
February 12, 2013 at 5:59 pm #32563Joe
Participantyes, thank you.
July 7, 2015 at 6:26 am #978597Support 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 ‘Modifying output of "tribe_get_ticket_form"’ is closed to new replies.
