• Resolved wpsitesimple

    (@wpsitesimple)


    Hi. Awesome plugin!

    Is there a way to set the sort order of the snippets by Name? I believe that it sorts by ID now and I have to resort manually by name each time.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter wpsitesimple

    (@wpsitesimple)

    Ahh please disregard. I found it in the snippet examples:

    add_filter( 'code_snippets/list_table/default_orderby', function () {
    	return 'name';
    } );

    Thanks!

    Plugin Author Shea Bunge

    (@bungeshea)

    Yeah, that snippet is currently the best way to change this.

    Do you think the plugin would benefit from a proper interface on the settings page to control this? I sort of like the idea of configuring things through code, but it does make it more difficult for people to work out how to change things.

    Thread Starter wpsitesimple

    (@wpsitesimple)

    Hi Shea,

    Yes, I do think that it would benefit adding it to the settings page to control it.

    I understand that your feelings about configuring with code, but some of the beginner coders may overlook the snippet you added on the default install (or just be blind like me, lol).

    But I wouldn’t go crazy with adding options in the config as it can clutter it up and confuse.

    I think this one fits though…

    Thanks for creating and maintaining this plugin. It’s an absolute must for me on sites!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Way to order snippets by Name by default’ is closed to new replies.