• I’m using a call to eo_get_the_start to display the event start time and date on this website: https://fredsy.com/CLIENT/hearnow/

    As you’ll see the posts are loaded with a plugin called Ajax Load More, which dynamically loads posts when the user clicks “Show More”

    In the top section, I’m using ALM to load two post types: “Posts” and “Events”. But for some reason the date does not appear in this top section, even though other Event Organiser function calls work, like the venue location.

    In the bottom section under the heading “All Upcoming Events” the start time and date displays properly. In this section I’m only querying “Event” post types. So this seems like a conflict that occurs when trying to query both Post and Event post types. Before I start diving really deep into the Ajax Load More plugin, I wanted to see if there is an obvious fix to this problem here first. Any help would be appreciated. Thanks!

    Template that Ajax Load More is using to display posts:

    <li class="
        <?php if (! has_post_thumbnail() ) { echo ' no-img'; } ?>
        <?php
    		if ( get_post_type() == 'event' ) { echo ' ajax-event'; } ?>
        ">
    	<div class="ajax-post-thumb">
    		<?php if ( has_post_thumbnail() ) {
        		the_post_thumbnail('frontpage-thumb');
       		}?>
    	</div>
    	<h3>
       		<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
            	<?php the_title(); ?>
       		</a>
    	</h3>
       	<p class="entry-meta">
        Posted on <span class="entry-meta-date"><?php the_time("F d, Y"); ?></span>
       	</p>
    	<div class="ajax-post-excerpt">
        <?php $thisevent_date = eo_get_the_start('g:ia, D M jS, Y'); ?>
        <?php if ( get_post_type() == 'event' ) { ?>
        <?php echo "<p>When: <strong>" . $thisevent_date . "</strong>" ?>
        <?php echo " Where: <strong>"; eo_venue_name(); echo "</strong></p>"; ?>
        <?php echo "<p><strong>" . get_field('ticket_price') . "</strong> "; ?>
        <?php echo '<a href="' . get_field('ticket_url') . '">' ?>
        <?php echo get_field('ticket_link_text') . "</a></p>"; ?>
        <?php } ?>
       		<?php the_excerpt(); ?>
    		<?php // the_content(); ?>
    		<?php // apply_filters( 'the_content', get_the_content() ); ?>
    	</div>
    </li>

    https://www.ads-software.com/plugins/event-organiser/

Viewing 1 replies (of 1 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Hi fredsy,

    Yes this is a known issue: the dates for individual occurrences of events are only available when querying only event types. This restriction is imposed by the nature of how events and their dates are stored in the database.

Viewing 1 replies (of 1 total)
  • The topic ‘eo_get_the_start Issue with Ajax Load More’ is closed to new replies.