Support » Plugin: Code Snippets » Order Snippets

  • Resolved WiSch


    Is it possible to order the snippets, so that I force on to be the first one?
    I want to use sessions and the code for activating it has to be the first in the functions.php
    So I’m looking for an option to sort the snippets and force the one for the sessions to be the first one.

    Thanks for your support and the great plugin.

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


    Snippets are executed in the order they appear in the database. So you can login through phpMyAdmin or similar, and reorder them there. Try messing around with the IDs of the snippets.

    If you’re not happy delving into the database, export your snippets as an XML file, and edit that, reordering the <snippet> sections. Then delete your snippets and re-import them.

    Wow, that was a fast reply!
    OK, I saw the IDs in the Database an will try that.
    Maybe you’ll include a function to order the snippets in a future version of the plugin, could also be usefull only to sort for organization or something like that.
    Thanks for your support.

    Plugin Author Shea Bunge


    As in, a UI for manually re-ordering snippets, or a filter that you can use in a custom plugin?

    I think about an UI to manually re-order the snippets. Some drag’n’drop to re-order and save the new sorting.

    Plugin Author Shea Bunge


    Hmm… maybe as another addon plugin. Thanks for the suggestion

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