Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    The sheets are ordered by the first date of each sheet, and then by id (order in which they were created). There is an option for you to move “Ongoing” type of sheets to the bottom of the list (since they don’t have a first date).

    The ordering was done that way so that the sheets that have task/item dates coming up the soonest would be shown first, which was the way our PTA wanted things displayed.

    There is currently no option to sort them any other way. However, there is a filter hook in place to allow other plugins (or theme functions) to modify the sheets before they are displayed. You could tap into that and resort the array of sheets any way that you want with a little bit of PHP code.

    Otherwise, if you don’t have the PHP skills and it’s something you want to see as a potential option/setting in a future release, then you should post that in the feature requests section of my site.

    Thread Starter delawaregrad

    (@delawaregrad)

    Thanks for the quick response.

    I understand your reasoning. My sheets are all ongoing, so alphabetical is the best option for me. I know some php, so I may take a look.

    Thanks!

    Plugin Author DBAR Productions

    (@dbar-productions)

    In the public class file, the filter you want to tap into is on line 318:

    // Allow plugins or themes to modify retrieved sheets
    $sheets = apply_filters( 'pta_sus_display_active_sheets', $sheets, $atts );

    $sheets will be an array of sheet objects, and if you want to sort alphabetically, you’ll need to check the $sheet->title property of each object and sort by that. The $atts variable that is also passed by that filter is the array of shortcode attributes.

    Thread Starter delawaregrad

    (@delawaregrad)

    Great, I plan to check that out.

    As always, thanks for your quick responses and really great plugin.

    Hi,
    I just tried installing this plugin locally, and when I go to save my settings, I get a bunch of errors..

    Notice: Undefined index: enable_test_mode in /Websites/www.sitename.com/wp-content/plugins/pta-volunteer-sign-up-sheets/classes/class-pta_sus_options.php on line 166

    Notice: Undefined index: hide_volunteer_names
    Notice: Undefined index: show_remaining

    and more, about 12 in total.

    Plugin Author DBAR Productions

    (@dbar-productions)

    You should start your own support thread instead of posting on one that is about something different and already resolved.

    Somehow when you installed the plugin, the default options didn’t get saved on activation. Those are just php notices (you must have debug turned on) and not errors. You see them because the array of options is not saved in the WordPress options table. Simply set and save the settings and then those should go away.

    ah, so sorry, totally forgot to do that. Thank you.

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