Wilfrank (@wilfrank)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Wilfrank
    Participant

    @wilfrank

    I made a small change so that the user can choose the sort order, but can anyone tell me why it does not work?

    function custom_bbp_has_topics($order) {
    
      switch ($order) {
        case 1:
            $args['order'] = 'ASC';
            break;
        case 2:
            $args['order'] = 'DESC';
            break;
        default:
            $args['order'] = 'DESC';
      }
      
      return $args;
    }
    add_filter('bbp_before_has_topics_parse_args', 'custom_bbp_has_topics' );
Viewing 1 replies (of 1 total)