Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • xnau, please help.

    Here is my code, but for some reason it still shows all the fields instead of only first_name & calendar_month

    <?php if ( $filter_mode == 'sort' || $filter_mode == 'both' ) : ?>
    
        <fieldset class="widefat">
          <legend><?php _e('Sort by', 'participants-database' )?>:</legend>
    
          <?php
          /*
           * this function sets the fields in the sorting dropdown. It has two options:
           *    1. columns: an array of field names to show in the sorting dropdown. If
           *       'false' shows default list of sortable fields as defined
           *    2. sorting: you can choose to sort the list by 'column' (the order they
           *       appear in the table), 'alpha' (alphabetical order), or 'order' which
           *       uses the defined group/field order
           */
          $this->set_sortables(true, 'first_name, calendar_month');
          ?>
    
          <?php $this->sort_form() ?>

    Hi NicolasMous, did you manage to sort out your problem?

    I have a birthday list and Tel Directory which is on 2 different pages and each page needs its own sort function.

    I created a custom template for this and did the changes which I though would work but it doesn’t. How do I assign the new template only to the Birthdays page? Also how do I get the Sort function to work the way I want it to work?

    Any help would be greatly appreciated.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)