• Resolved eb29

    (@eb29)


    Hello there,
    My question is in the title.
    Explanations :
    I use your great plugin Events Manager for a client’s website (thank you for it !) and I’ve found a free plugin which allow me to display recents events in a elegant slider on my home page.
    Until there, it displays only the start date of the events but not the end date and time.
    How can I make appear end date and time ?

    This is the loop of my slider home page :

    <div class="post-content-left wp-medium-8 wpcolumns">
    	
    	<?php if($showCategory) { ?>
    	<div class="recentpost-categories">		
    			<?php echo $cat_list; ?>
    		</div>
    	<?php } ?>		
    		  <h2 class="wp-post-title">
    				<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    			</h2>
    		<?php if($showDate || $showAuthor)    {  ?>	
    			<div class="wp-post-date">
    				<?php  if($showAuthor) { ?> <span><?php  esc_html_e( 'By', 'wp-responsive-recent-post-slider' ); ?>  <?php the_author(); ?></span><?php } ?>
    				<?php echo ($showAuthor && $showDate) ? '&nbsp;/&nbsp;' : '' ?>
    				<?php if($showDate) { echo get_the_date(); } ?>
    			
    				iii
    				</div>
    				<?php }   ?>
    				
    				<?php if($showContent) {  ?>	
    				<div class="wp-post-content">
    				<?php
    					$customExcerpt = get_the_excerpt();				
    					if (has_excerpt($post->ID))  { ?>
    						<div class="wp-sub-content"><?php echo $customExcerpt ; ?></div> 
    					<?php } else {
    						$excerpt = strip_shortcodes(strip_tags(get_the_content())); ?>
    					<div class="wp-sub-content"><?php echo wprps_limit_words($excerpt,$words_limit); ?></div>	
    					<?php } ?>
    					
    					<?php if($showreadmore) { ?>
    						<a class="readmorebtn" href="<?php the_permalink(); ?>"><?php _e('Read More', 'wp-responsive-recent-post-slider'); ?></a>
    					<?php } ?>
    					
    				</div>
    				<?php } ?>
    				</div>

    Thank you in advance for the time spent answering me!

Viewing 3 replies - 1 through 3 (of 3 total)
  • i use a shortcode to display recent events, it’s easier to customize with html / css and Placeholders, example :

    [events_list scope="future" limit="5" orderby="event_id" order="DESC"]#Placeholders with a little bit html and css[/events_list]

    i hope this will help

    Thread Starter eb29

    (@eb29)

    Thank you for your reply !
    I think, however, that I have misunderstood myself.
    The slider I use on the site retrieves the custom_post_type EVENT generated by EVENTS MANAGER events to display the most recent events in the slider.
    What’s missing about the result of the slider’s display is actually the dates (start and end) and the times on the events.
    And for that, I can not enter anywhere shortcode / placeholder, the only way seems to be to modify the loop.
    A suggestion for that?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try something like this

    
    <?php get_header(); ?>
    
    <?php
    			global $post;
    
    			$EM_Event = em_get_event($post->ID, 'post_id');
    
    		?>
    
      
    <div class="container" style="padding-top:10px;">
        <div class="row-fluid"> 
    
        <div class="span8">
    		
    
    		
    		<h1 class="single"><?php echo $EM_Event->output('#_EVENTNAME'); ?></h1>
    		<div class="blockhead">                          
                                  <p> 
                                   
                                     <?php $startdate = $EM_Event->event_start_date;?>
                                     Datum : <?php echo $EM_Event->output('#_EVENTDATES');?>, <?php echo $EM_Event->output('#_EVENTTIMES');;?><br/>
                                     Locatie : <?php echo $EM_Event->location->location_name;?><br/>
                                     Adres : <?php echo $EM_Event->location->location_address;?>, <?php echo $EM_Event->location->location_town;?>
                                  </p>
                    </div>   
    
    		<div class="entry">
    		 <?php echo $EM_Event->post_content; ?>
    		</div>
    
    	</div>
    	<div class="span4">
    		<?php ###I want the_bookingform here!>
    
    	</div>
    </div>
    </div>
    <?php get_footer(); ?>
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to display the dates and times in a slider loop?’ is closed to new replies.