'tribe_events_single_event_after_the_meta'

Home Forums Calendar Products Events Calendar PRO 'tribe_events_single_event_after_the_meta'

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1090051
    Cesar
    Participant

    Goor morning,

    Do you now where I can find the fucntion ‘tribe_events_single_event_after_the_meta’ which I would like to modify please?
    It does not exist on my theme’s function file.

    The objective is to repair the side bar which now shows the attendants (example here example):

    <aside class=”sidebar”>
    <div class=”prices”>
    <header>À partir de <?php echo $mypriceminimum; ?>€</header>
    <?php do_action( ‘tribe_events_single_event_after_the_meta’ ) ?>
    <span class=”resting-time”><i class=”fa fa-clock-o”></i> <?php the_widget( ‘Tribe__Events__Pro__Countdown_Widget’, $instance, $args ); ?></span>
    </div>
    <div class=”favorites”>
    Ajouter à mes favoris
    <div class=”shareit”>
    <span>Partager…</span><?php the_widget(“ssba_widget”); ?>
    </div>
    <div class=”url”>
    <input type=”text” readonly value=”<?php the_permalink(); ?>” class=”url-to-copy”>
    Copier
    </div>
    </div>
    </aside>

    Thank you.

    #1090536
    Nico
    Member

    Hey Cesar,

    Thanks for reachign out to us on this! Interesting question…

    The correct way to disable the attendees list, is adding the following snippet to your theme’s (or child theme) functions.php:


    /**
    * Disables the public attendee lists on all events
    *
    * Removes the tribe_events_single_event_after_the_meta action that injects the attendee
    * list that was introduced with the initial 4.1 release of Event Tickets Plus
    */
    function disable_attendee_list_on_post() {
    if ( ! class_exists( 'Tribe__Tickets_Plus__Attendees_List' ) ) {
    return;
    }

    remove_action(
    'tribe_events_single_event_after_the_meta',
    array(
    Tribe__Tickets_Plus__Attendees_List::instance(),
    'render'
    ),
    4
    );
    }

    add_action( 'wp', 'disable_attendee_list_on_post' );

    Please give that a try and let me know if it works for you,
    Best,
    Nico

    #1090560
    Dan Feeley
    Participant

    Nico,

    Thank you for this snippet. This is exactly what I was looking for as well, however I am getting a syntax error on the remove_action and am not quite sure what is causing it.

    PHP Parse error: syntax error, unexpected ‘remove_action’

    #1090757
    Dan Feeley
    Participant

    Never mind, I got it. Thanks

    #1090874
    Nico
    Member

    Hey Dan,

    Glad you could benefit from this as well 🙂

    Cesar, please let me know if it works for you…

    Have a great weekend,
    Nico

    #1091115
    Cesar
    Participant

    Hi Nico,

    I’m getting this

    Parse error: syntax error, unexpected ‘remove_action’ (T_STRING) in /home/leezgoc1/public_html/demo/wp-content/themes/leezgo/functions.php on line 14

    Also I would like to remove RSVP and just have WooCommerce.

    Thank you.

    #1091954
    Nico
    Member

    Hi there Cesar,

    Thanks for following up with this!

    Seems you are hitting a syntax / format issue when pasting the code. Try this version of the snippet instead:


    function disable_attendee_list_on_post() {
    if ( ! class_exists( 'Tribe__Tickets_Plus__Attendees_List' ) ) {
    return;
    }
    remove_action('tribe_events_single_event_after_the_meta', array(Tribe__Tickets_Plus__Attendees_List::instance(),'render'),4);
    }
    add_action( 'wp', 'disable_attendee_list_on_post' );

    Sometimes it’s a good idea to paste the function in a plain-text editor and then copying it over the functions file.

    Regarding RSVP, I’m not sure what you mean by disabling it. If you just don’t create RSVP type tickets nothing should show up in the front-end. Can you please clarify on this?

    Please give it a new try and let me know,
    Best,
    Nico

    #1092547
    Cesar
    Participant

    Thank you Nico,

    It worked!

    Cesar

    #1092564
    Nico
    Member

    Stocked to hear Cesar, thanks for confirming 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘'tribe_events_single_event_after_the_meta'’ is closed to new replies.