Forum Replies Created
-
AuthorPosts
-
Brett JohnsonParticipant
I finally figured it out. See code below for anyone looking to get PAST EVENTs for a single organizer. This of course is modifying the following file:
wp-content/plugins/events-calendar-pro/src/views/pro/single-organizer.php—— Working Code Below ——–
if ( ! defined( ‘ABSPATH’ ) ) {
die( ‘-1’ );
}$organizer_id = get_the_ID();
if (isset($_GET[‘requestpastevents’])) {
$requestpastevents = $_GET[‘requestpastevents’];
}if ($organizer_id == 68 && $requestpastevents == ‘true’) {
while ( have_posts() ) : the_post(); ?>
<div class=”tribe-events-organizer”>
<p class=”tribe-events-back”>
” rel=”bookmark”><?php printf( __( ‘← Back to %s’, ‘tribe-events-calendar-pro’ ), tribe_get_event_label_plural() ); ?><?php do_action( ‘tribe_events_single_organizer_before_organizer’ ) ?>
<div class=”tribe-events-organizer-meta tribe-clearfix”><!– Organizer Title –>
<?php do_action( ‘tribe_events_single_organizer_before_title’ ) ?>Past Events for: <?php echo tribe_get_organizer( $organizer_id ); ?>
<?php do_action( ‘tribe_events_single_organizer_after_title’ ) ?>
<!– Organizer Meta –>
<?php do_action( ‘tribe_events_single_organizer_before_the_meta’ ); ?>
<?php echo tribe_get_organizer_details(); ?>
<?php do_action( ‘tribe_events_single_organizer_after_the_meta’ ) ?><!– Organizer Featured Image –>
<?php echo tribe_event_featured_image( null, ‘full’ ) ?><!– Organizer Content –>
<?php if ( get_the_content() ) { ?>
<div class=”tribe-organizer-description tribe-events-content”>
<?php the_content(); ?>
</div>
<?php } ?></div>
<!– .tribe-events-organizer-meta –>
<?php do_action( ‘tribe_events_single_organizer_after_organizer’ ) ?><!– Custom by RF: Past Event list –>
<?php
// Use the tribe_include_view_list() function to be able to display past events
echo tribe_include_view_list( array(
‘organizer’ => $organizer_id,
‘eventDisplay’ => ‘past’,
‘order’ => ‘DESC’,
‘posts_per_page’ => -1
) );
?></div><!– .tribe-events-organizer –>
<?php
do_action( ‘tribe_events_single_organizer_after_template’ );
endwhile;} else {
while ( have_posts() ) : the_post(); ?>
<div class=”tribe-events-organizer”>
<p class=”tribe-events-back”>
” rel=”bookmark”><?php printf( __( ‘← Back to %s’, ‘tribe-events-calendar-pro’ ), tribe_get_event_label_plural() ); ?><?php do_action( ‘tribe_events_single_organizer_before_organizer’ ) ?>
<div class=”tribe-events-organizer-meta tribe-clearfix”><!– Organizer Title –>
<?php do_action( ‘tribe_events_single_organizer_before_title’ ) ?><?php echo tribe_get_organizer( $organizer_id ); ?>
<?php do_action( ‘tribe_events_single_organizer_after_title’ ) ?>
<!– Organizer Meta –>
<?php do_action( ‘tribe_events_single_organizer_before_the_meta’ ); ?>
<?php echo tribe_get_organizer_details(); ?>
<?php do_action( ‘tribe_events_single_organizer_after_the_meta’ ) ?><!– Organizer Featured Image –>
<?php echo tribe_event_featured_image( null, ‘full’ ) ?><!– Organizer Content –>
<?php if ( get_the_content() ) { ?>
<div class=”tribe-organizer-description tribe-events-content”>
<?php the_content(); ?>
</div>
<?php } ?></div>
<!– .tribe-events-organizer-meta –>
<?php do_action( ‘tribe_events_single_organizer_after_organizer’ ) ?><!– Upcoming event list –>
<?php do_action( ‘tribe_events_single_organizer_before_upcoming_events’ ) ?><?php
// Use the tribe_events_single_organizer_posts_per_page to filter the number of events to get here.
echo tribe_organizer_upcoming_events( $organizer_id ); ?><?php do_action( ‘tribe_events_single_organizer_after_upcoming_events’ ) ?>
</div><!– .tribe-events-organizer –>
<?php
do_action( ‘tribe_events_single_organizer_after_template’ );
endwhile;
}Brett JohnsonParticipantHi Jaime,
Is there a fee associated with being added to the customization queue? If there is no fee please add me to it. Otherwise no thank you.
thanks,
RonaldBrett JohnsonParticipantThanks for your reply Jaime.
If this is as far as I can go regarding support from you guys I guess I’m on my own for the rest of the way. I’ve done similar customizations with your plugin on our site so I’m hoping I will not need additional “customizer” support. I came here to the support forum trying to save a little time since at times I find it difficult wading through your documentation and trying to find the correct functions suitable for the task without having to reinvent the wheel per say.
Ronald
Brett JohnsonParticipantThis reply is private.
Brett JohnsonParticipantThis reply is private.
Brett JohnsonParticipantThis reply is private.
Brett JohnsonParticipantHi Jaime,
Thank you for your assistance. How do I find the organizer ID?
http://www.your-site.com/events/list/?tribe_paged=1&tribe_event_display=past&tribe_organizers=2869
Brett JohnsonParticipantThank you! That was very helpful and you were correct my Theme was also manipulating wp_title(). So I hooked on to your filters and changed the title accordingly for Events only.
-
AuthorPosts