Home › Forums › Calendar Products › Events Calendar PRO › 'tribe_events_single_event_after_the_meta'
- This topic has 8 replies, 3 voices, and was last updated 8 years, 1 month ago by Nico.
-
AuthorPosts
-
March 16, 2016 at 4:28 pm #1090051CesarParticipant
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.
March 17, 2016 at 1:00 pm #1090536NicoMemberHey 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,
NicoMarch 17, 2016 at 1:26 pm #1090560Dan FeeleyParticipantNico,
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’
March 17, 2016 at 7:39 pm #1090757Dan FeeleyParticipantNever mind, I got it. Thanks
March 18, 2016 at 4:38 am #1090874NicoMemberHey Dan,
Glad you could benefit from this as well 🙂
Cesar, please let me know if it works for you…
Have a great weekend,
NicoMarch 18, 2016 at 11:25 am #1091115CesarParticipantHi 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.
March 21, 2016 at 11:59 am #1091954NicoMemberHi 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,
NicoMarch 22, 2016 at 12:07 pm #1092547CesarParticipantThank you Nico,
It worked!
Cesar
March 22, 2016 at 12:30 pm #1092564NicoMemberStocked 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 -
AuthorPosts
- The topic ‘'tribe_events_single_event_after_the_meta'’ is closed to new replies.