Title: Adding Orderby ID
Last modified: July 8, 2018

---

# Adding Orderby ID

 *  Resolved [Blogging Theme Styles](https://wordpress.org/support/users/bloggingthemes/)
 * (@bloggingthemes)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-orderby-id/)
 * I have a suggestion for you which will benefit a lot of people who use this plugin,
   such as myself. None of the orderby options in the widget dropdown list offer
   the one and very important option of “ID”. The date is OK, but if you’re creating
   many posts one-after-the-other, this doesn’t work very well.
 * I noticed that the best way to ensure descending or ascending order is to do 
   it by ID, so I modified the option list to include the ID:
 *     ```
         public static function lcp_orders(){
           return array("date" => __("Date", "list-category-posts"),
                        "modified" => __("Modified Date", "list-category-posts"),
                        "title" => __("Post title", "list-category-posts"),
                        "author" => __("Author", "list-category-posts"),
       		"id" => __("ID", "list-category-posts"),
                        "rand" => __("Random", "list-category-posts"));
         }
       ```
   
 * Now I know you will say “never edit the main files” which is sound advice, but
   I needed this for the site I am building right now so I just have to remember
   not to click update on this plugin unless it has the choice I added.
 * So my recommendation and request is to make it official and add ID to the option
   list for “orderby”. Takes just a quick moment to do that 🙂
 * How I’m using it:
 * I design themes so I need each theme to have it’s own setup tutorial category.
   I use this plugin to place it in the left sidebar column and I needed the posts
   to start from the introduction of the theme, then to the installation, etc, etc.,
   but to have it start at the top => downward by using the ID and choosing ascending.

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

 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10473306)
 * Hi
 * Thanks for the suggestion. Could you create a pull request with these changes
   in the plugin’s [Github repository](https://github.com/picandocodigo/List-Category-Posts)?
 *  Thread Starter [Blogging Theme Styles](https://wordpress.org/support/users/bloggingthemes/)
 * (@bloggingthemes)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10473347)
 * I would but I don’t have a git user account and have never used github before.
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10473403)
 * Ok then, I’ll create one later.
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10473898)
 * You can also solve the problem right away without editing any files. Just use
   the lcp shortcode in the widget. This is the preferred way to use this plugin,
   we are not focusing development on the regular LCP widget.
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10702735)
 * Implemented in 0.78.1
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10703034)
 * Sprry, in 0.79

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

The topic ‘Adding Orderby ID’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/adding-orderby-id/#post-10703034)
 * Status: resolved