Todays events query

This topic contains 12 replies, has 4 voices, and was last updated by  Paolo 10 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: , ,

  • Author
    Posts
  • #6564

    salsaturation
    Free User
    Post count: 12

    Hi

    I have been using GeoTheme and I am now in he process of changing the site to use GeoDirectory plugins. So far so goo but I have come abit unstuck.

    Under GeoThemes I had the following code to pull todays events – but I have no idea how accomplish the same thing in using GeoDirectory Event Manager since the date fields are no longer post meta’s

    
    
    
    <?php
    echo date('l j F');
    ?>
        <?php // WP_Query arguments
        $event1 = current_time('Y-m-d');
    $args = array (
    	'post_type'              => 'event',
    	'post_status'            => 'publish',
        'meta_query' => array(
    		array(
    			'key' => 'st_date',
    			'compare' => '=',
    			'value' => $event1,
    			)
    			),
        'orderby' => 'meta_value' ,
        'meta_key' => 'st_date' ,
        'order' => 'ASC',
    );
    
    // The Query
    $query = new WP_Query( $args );
    			while( $query -> have_posts() ) : $query -> the_post();
    			?>
     <div class="do-today">
     <span class="do-thumbnail"><?php the_post_thumbnail(); ?></span>
              <div class="do-details">
    			<span class="do-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></span>
    
                  <div class="do-meta">
            <span class="do-address"><?php
            /* display city name on listing */
                    $cityid = get_post_meta($post->ID,'post_city_id','true');
                    /* echo $cityid; */
                    global $wpdb;
                    $cityname = $wpdb->get_var("select cityname from $multicity_db_table_name where  city_id="$cityid"");
                    echo $cityname;
            ?></span> | <span class="do-age-range"><?php echo get_post_meta($post->ID, 'age_range', true); ?></span> | <span class="do-fees"><?php echo get_post_meta($post->ID, 'reg_fees', true); ?></span>
             </div>
                  </div>
        </div>   
    
        
        
        
    			<?php
    			endwhile;
    			wp_reset_postdata();
        ?>
    

    Anyone know how I can display todays events?

    Thanks in advance

    #6635

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #6723

    salsaturation
    Free User
    Post count: 12

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #7142

    Vikas
    Full Member
    Post count: 1128

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #7147

    salsaturation
    Free User
    Post count: 12

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #7336

    Vikas
    Full Member
    Post count: 1128

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #7340

    salsaturation
    Free User
    Post count: 12

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #7342

    Vikas
    Full Member
    Post count: 1128

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #7373

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #11848

    amolin
    Buyer
    Post count: 161

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #11852

    salsaturation
    Free User
    Post count: 12

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #11918

    amolin
    Buyer
    Post count: 161

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #11962

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount