Ready to get started?Download WordPress


Group by Month from custom date field (2 posts)

  1. swcomm
    Posted 2 years ago #

    Is it possible to group this query of classes by month, using the month name as a subhead?

      'category__and' => array(21,25),
      'post_type' => 'classes',
      'post_status' => 'publish',
      'posts_per_page' => -1,
      'caller_get_posts'=> 1,
    'meta_key'=> StartDate,
    'order'=> ASC
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts()

    The month name would be coming from the StartDate field. I'd like display these classes like:

    Class 1
    Class 2

    Class 3
    Class 4

    etc. Thanks for any advice.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic