Title: Enable Post Order programmatically
Last modified: September 3, 2019

---

# Enable Post Order programmatically

 *  Resolved [Ignacio](https://wordpress.org/support/users/iignacio/)
 * (@iignacio)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/enable-post-order-programmatically/)
 * Hey,
 * Is there a way to enable post order (options-general.php?page=scporder-settings)
   programmatically, for a certain post type?
 * I’d like to enable SCP for taxonomies via functions.php for example.
 * Thanks
    -  This topic was modified 6 years, 7 months ago by [Ignacio](https://wordpress.org/support/users/iignacio/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Miha](https://wordpress.org/support/users/mplusb/)
 * (@mplusb)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/enable-post-order-programmatically/#post-11898114)
 * Hello [@iignacio](https://wordpress.org/support/users/iignacio/),
 * You can do this by filtering get_option: [https://codex.wordpress.org/Plugin_API/Filter_Reference/option_(option_name)](https://codex.wordpress.org/Plugin_API/Filter_Reference/option_(option_name))
   
   The option’s name where they are stored is: scporder_options which is an array
   and in ‘objects’ will keep all the custom posts and in ‘tags’ the taxonomies.
 * All the best,
    Mihaela
    -  This reply was modified 6 years, 7 months ago by [Miha](https://wordpress.org/support/users/mplusb/).
 *  Thread Starter [Ignacio](https://wordpress.org/support/users/iignacio/)
 * (@iignacio)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/enable-post-order-programmatically/#post-11898252)
 * Hi [@mplusb](https://wordpress.org/support/users/mplusb/), thanks for your quick
   reply.
 * After digging into the plugin’s code I ended up doing what you suggest. Here’s
   the code in case someone finds it useful.
 *     ```
       if (is_plugin_active('simple-custom-post-order/simple-custom-post-order.php')) {
           if (!get_option('scporder_options')) {
               update_option('scporder_options', array('objects' => '', 'tags' => array('category')));
           }
       }
       ```
   
 * Would it make sense to have a function set this programmatically?
    Like `scp_enable('
   tags' => array('category'))`
 * Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Enable Post Order programmatically’ is closed to new replies.

 * ![](https://ps.w.org/simple-custom-post-order/assets/icon-256x256.jpg?rev=2969435)
 * [Simple Custom Post Order](https://wordpress.org/plugins/simple-custom-post-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-custom-post-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-custom-post-order/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-custom-post-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-custom-post-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-custom-post-order/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ignacio](https://wordpress.org/support/users/iignacio/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/enable-post-order-programmatically/#post-11898252)
 * Status: resolved