• Resolved Graham

    (@sandgroper)


    I am using BuddyPress with Events Manager. When I go to a profile page and view “My Event Bookings” the list of recent bookings is sorted by booking name, ascending as seen here

    I need it by start date, descending. Choosing that in the admin panel settings for “Other Pages” has no effect. It does say BuddyPress will override the setting.

    I looked at:

    /wp-content/plugins/events-manager/templates/templates/my-bookings.php

    but there is nothing there that refers to the sort order. I could not find it anywhere else either.

    Does anyone know where this is set?

    Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • jordanthedesigner

    (@jordanthedesigner)

    Perhaps this snippet will solve your issue:

    function my_em_wp_query(){
    $args = array(
    ‘post_type’ => ‘event’,
    ‘posts_per_page’ => 100,
    ‘meta_query’ => array( ‘key’ => ‘_start_ts’, ‘value’ => current_time(‘timestamp’), ‘compare’ => ‘>=’, ‘type’=>’numeric’ ),
    ‘orderby’ => ‘meta_value_num’,
    ‘order’ => ‘ASC’,
    ‘meta_key’ => ‘_start_ts’,
    ‘meta_value’ => current_time(‘timestamp’),
    ‘meta_value_num’ => current_time(‘timestamp’),
    ‘meta_compare’ => ‘>=’
    );

    // The Query
    $query = new WP_Query( $args );

    // The Loop
    while($query->have_posts()):
    $query->next_post();
    $id = $query->post->ID;
    echo ‘

    • ‘;
      echo get_the_title($id);
      echo ‘ – ‘. get_post_meta($id, ‘_event_start_date’, true);
      echo ‘
    • ‘;
      endwhile;

      // Reset Post Data
      wp_reset_postdata();
      }
      add_shortcode(’em_wp_query’,’my_em_wp_query’);
      note: modify if needed

    Thread Starter Graham

    (@sandgroper)

    Hi Jordan,

    You’re confusing me with someone who knows what they’re doing!

    I have no idea what to do with all that code.

    All I really want to know is where are those two settings in my screenshot located, so I can change them.

    Unfortunately, there are no settings for that page in admin.

    Thread Starter Graham

    (@sandgroper)

    Hi caimin_nwl,

    I realize that. But it is hard coded somewhere, I just can’t find where.

    What’s the URL structure of the page you want to change?

    Thread Starter Graham

    (@sandgroper)

    Hi Caimin,

    The URL is:

    https://mysite.com/members/0001/events/my-bookings/

    Going to My Event Bookings and filtering by All Events, All Status.

    Of course you have to be logged in to see the real page.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry, can you re-post this thread and then just include the url of this thread as reference? it seems that there is a snippet here that does not properly wrapped in a code tag.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘My Bookings Sort Order’ is closed to new replies.