WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Multiple Events. (2 posts)

  1. WebDevB
    Member
    Posted 1 year ago #

    Jonah,

    Would if you could help me out again.

    Is it possible to have mutilple events / meetings within 1 post?

    For Instance.

    Football Game:

    Next Event: 11/10/12 @ 14:00pm
    Next Event: 12/10/12 @ 09:00am

    Thanks,

    WebDevB

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. jonahcoyote
    Member
    Posted 1 year ago #

    Hey WebDevB,

    To accomplish this you would want to setup a custom query (or two) in the single event view (/wp-content/plugins/the-events-calendar/views/single.php).

    Here is an example of a query you could run:

    <ul class="generic">
          <?php
    
          $args = array(
              'post_status'=>'publish',
              'post_type'=>array(TribeEvents::POSTTYPE),
              'posts_per_page'=>1,
              'orderby'=>'title',
              'order'=>'ASC'
          );
          $get_posts = null;
          $get_posts = new WP_Query();
    
          $get_posts->query($args);
          if($get_posts->have_posts()) : while($get_posts->have_posts()) : $get_posts->the_post(); ?>
    
            <li>
              <?php the_title(); ?>
            </li>
    
          <?php
            endwhile;
            endif;
            wp_reset_query();
          ?>
        </ul>

    Does that help?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.