Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter josephncampbell

    (@josephncampbell)

    I found the answer:
    `.pac-container {
    }

    Thread Starter josephncampbell

    (@josephncampbell)

    I tried the code you provided but didnt get any results back. This page is a custom template page that I created. I did see on google people having issues with ‘paged’ outside of the home page. Not sure what the issue is.

    Also, How do i include the time as well. and exclude all old dates?

    <?php
    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    
    $args= array(
    	'posts_per_page' => 4,
    	'paged'          => $paged,
    	'post_type'      => array( 'Event' ),
    	'category_name'  => array('eventslist', 'featured-events'),
    	'meta_key'       => 'event-date',
    	'orderby'        => 'meta_value',
    	'order'          => 'ASC',
    	'meta_query' => array(
    		array(
    			'key'     => 'event-date',
    			'value'   => date( "Y-m-d" ),
    			'compare' => '>=',
    			'type'    => 'DATE',
    		)
    	)
    );
    
    $the_query = new WP_Query( $args );
    
    if ( $the_query->have_posts() ) :
    	while ( $the_query->have_posts() ) : $the_query->the_post();
    ?>
    
    <div class="event-item">
    					<span class="event-date float-left upperC"><?php $Date = get_post_meta($post->ID, 'Date', true); ?><?php echo $Date; ?></span>
    					<span class="event-title float-left"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    					<div class="text-align-left subEventDate">
    						<span class="event-dow"><?php $DayofWeek = get_post_meta($post->ID, 'Day of Week', true); ?><?php echo $DayofWeek; ?></span><span> |  </span>
    						<span class="event-time"><?php $Time = get_post_meta($post->ID, 'Time', true); ?><?php echo $Time; ?></span><span> |</span>
    						<span class="event-location"><?php $Location = get_post_meta($post->ID, 'Location', true); ?><?php echo $Location; ?></span>
    
    					</div>
    					</span>
    					<span class="eventButtonCont float-right"><a href="<?php the_permalink(); ?>" class="eventButtonIcon text-align-right"><i class="fa fa-chevron-right fa-3x"></i></a></span>
    					<div class="clear-both"></div>
    				</div>
    
    <?php endwhile; ?>
    <?php endif; ?>
    <?php wp_reset_postdata(); ?>
    
    		<div id="moreEventsLink" class="float-left paddbottom20"> <a href="/index.php/category/eventslist/">more events</a></div>
    		</div>
Viewing 2 replies - 1 through 2 (of 2 total)