• Resolved vinchoz

    (@vinchoz)


    Hello,
    Our events are listed in the basic WP search result.
    We would like to add the start date after the title if it’s an event.

    In content-search.php: we used this:

    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
    	<header class="entry-header">
    		<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
    	</header><!-- .entry-header -->
    
    	<?php $date= eo_get_the_start( 'Ymd', $post_id ); echo $date; ?>
    
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div><!-- .entry-summary -->
    
    </article><!-- #post-<?php the_ID(); ?> -->
    

    without no success…

    Any other idea?
    TX

Viewing 1 replies (of 1 total)
  • Thread Starter vinchoz

    (@vinchoz)

    If i try width the venues… i add:

    <?php echo 'Place:'.eo_get_venue_name(); ?>

    I get the Venue name in my search result.
    Everything ok

    BUT i don’t get the start date with all this test:

    
    <?php echo 'Date: '.eo_get_the_start(); ?>
    <?php echo 'Date: '.eo_get_the_start( 'jS F Y', $post->ID ); ?>
    <?php echo eo_get_the_start('jS M YY', $post->ID); ?>
    <?php echo eo_get_the_start("jS M YY"); ?>
    <?php echo eo_get_the_start(); ?>
    <?php echo eo_get_the_start( 'jS F Y', $post->ID, $post->occurrence_id ); ?>
    <?php eo_the_start( $format = 'd-m-Y', $post->ID );?>
    <?php eo_the_start( $post->ID );?>
    

    Somebody see what i’m doing wrong…

Viewing 1 replies (of 1 total)
  • The topic ‘Display start date in WP basic search result’ is closed to new replies.