Unfortunately, we don't have an option to change the order directly; it will require custom work. 

However, you can use the following custom code to change the order of courses based on a custom field like course_order. You can add this code to your child theme’s functions.php file:


function custom_buddyboss_my_courses_ordering( $args, $user_id ) {
    // Modify the query only for the "My Courses" section
    $args['meta_key'] = 'course_order'; // Custom field for the course order
    $args['orderby'] = 'meta_value_num'; // Sorting by the course order value (numeric)
    $args['order'] = 'ASC'; // Change to 'DESC' if you want descending order

    return $args;
}
add_filter( 'ld_profile_query_args', 'custom_buddyboss_my_courses_ordering', 10, 2 );



For this custom order to work, you need to add a custom field named course_order to each course:
  1. Go to LearnDash LMS > Courses in your WordPress dashboard.
  2. Edit each course.
  3. Scroll down to the Custom Fields section.
  4. Add a custom field named course_order and assign it a value (e.g., 1 for the first course, 2 for the second, etc.).
  5. Save the course.
If you don't have custom field support enabled, you'll need to activate it for your LearnDash courses.