• Resolved WiSch

    (@wisch)


    Hi.
    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.

    http://wordpress.org/extend/plugins/code-snippets/

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

    (@bungeshea)

    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.

    Thread Starter WiSch

    (@wisch)

    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

    (@bungeshea)

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

    Thread Starter WiSch

    (@wisch)

    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

    (@bungeshea)

    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.