• Resolved jorniel1

    (@jorniel1)


    Greetings friends, could you tell me how I can order the directory by column 2 and not by column 1? Will there be a shortcode for this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ERA404

    (@era404)

    Hello @jorniel1

    In the current version, StaffList sorts by whichever column you placed in the first position. We do plan to add a feature for admins to select an alternate sort column, and assure you that this change is on our development roadmap, but a date hasn’t yet been scheduled for that update.

    We appreciate your patience and thank you for using StaffList.
    ERA404

    Thread Starter jorniel1

    (@jorniel1)

    Thanks for the answer, will it be possible for you to tell me where in the code I can change so that it does not take the first column to order and that I can change it so that it takes the second column?

    Plugin Author ERA404

    (@era404)

    Hmm. well i don’t recommend altering code.
    But in v3.1.7, the default sort ($cols[0]['id']) is set on line 579.

    Thread Starter jorniel1

    (@jorniel1)

    ok thanks on line 579 I edited the following:

    $cols[0][‘id’];

    and I put the following

    $cols[1][‘id’];

    With this I was able to order the first page, but if I change the page all the others are ordered again by the first column and not by the second.

    • This reply was modified 1 year, 12 months ago by jorniel1.
    • This reply was modified 1 year, 12 months ago by jorniel1.
    Plugin Author ERA404

    (@era404)

    Hello @jorniel1

    StaffList v3.1.9 adds a shortcode attribute for what you need.

    See:
    https://wordpress.org/plugins/stafflist/#developers

    Additional detail added to the Shortcodes pulldown within the plugin’s admin page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to sort by column position’ is closed to new replies.