Modifying output of "tribe_get_ticket_form"

Home Forums Calendar Products Events Calendar PRO Modifying output of "tribe_get_ticket_form"

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #32363
    Joe
    Participant

    Hi 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!

    #32382
    Jonah
    Participant

    Hi 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

    #32394
    Joe
    Participant

    Hey 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!

    #32398
    Jonah
    Participant

    Hey Joe,

    Gotcha. What about putting some conditional code within tickets.php for your custom template? if(is_page(‘about’) {} … ?

    – Jonah

    #32482
    Joe
    Participant

    Wow, 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.

    #32483
    Joe
    Participant

    Wow, 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.

    #32553
    Jonah
    Participant

    Hi Joe, glad to hear that works for you. So are you all set here? Can I close this out?

    – Jonah

    #32563
    Joe
    Participant

    yes, thank you.

    #978597
    Support Droid
    Keymaster

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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Modifying output of "tribe_get_ticket_form"’ is closed to new replies.