• Resolved carletto0282

    (@carletto0282)


    Hi there,
    I’d like to thank you for your great work.

    I’m making a sort of portal and I need several loops in the homepage.

    I’d like to have also a loop with my events.

    I’m trying to use a wp_query like this

    // The Last Added Event Query
    				$args = array(
    							'posts_per_page'  => 3,
    							'post_type'       => 'ai1ec_event',
    							'orderby'         => 'date',
    							'order'           => 'DESC',
    							'post_status'     => 'publish' );
    
    				$last_added_events = new WP_Query( $args );
    
    				if ( have_posts() ) :
    				echo '<ul>';
    			// The Loop
    				while ( $last_added_events->have_posts() ) : $last_added_events->the_post();
    				?>
    					<li>
    						<a href="<?php echo the_permalink(); ?>" title="<?php echo the_title_attribute(); ?>">
    							<?php echo the_title(); ?>
    						</a>
    					</li>					
    
    				<?php
    				endwhile;
    				echo '</ul>';
    				else:
    				?>
    					<ul>
    						<li><p>Sorry, no events at the moment.</p><li>
    					</ul>
    				<?php
    				endif;
    
    			// Reset Post Data
    				wp_reset_postdata();

    My problem is that I’d like to show also the date and the map of that event but I don’t know how to do.

    Thanks

    Carloalberto

    https://www.ads-software.com/extend/plugins/all-in-one-event-calendar/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] Event custom loop’ is closed to new replies.