{"id":42249,"date":"2016-03-01T00:11:19","date_gmt":"2016-03-01T00:11:19","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-sort-order\/"},"modified":"2025-01-07T08:18:02","modified_gmt":"2025-01-07T08:18:02","slug":"wp-sort-order","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/wp-sort-order\/","author":11237862,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.5","stable_tag":"1.3.5","tested":"6.8.5","requires":"3.5.0","requires_php":"7.0","requires_plugins":null,"header_name":"WP Sort Order","header_author":"Fahad Mahmood","header_description":"","assets_banners_color":"9ca891","last_updated":"2025-01-07 08:18:02","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/androidbubble.com\/blog\/wordpress\/plugins\/wp-sort-order","header_author_uri":"http:\/\/www.androidbubble.com","rating":4.5,"author_block_rating":0,"active_installs":6000,"downloads":89608,"num_ratings":17,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"fahadmahmood","date":"2018-01-05 23:49:39"},"1.1.0":{"tag":"1.1.0","author":"fahadmahmood","date":"2017-07-05 10:41:25"},"1.1.1":{"tag":"1.1.1","author":"fahadmahmood","date":"2017-07-05 10:41:25"},"1.1.2":{"tag":"1.1.2","author":"fahadmahmood","date":"2017-07-05 10:41:25"},"1.1.3":{"tag":"1.1.3","author":"fahadmahmood","date":"2017-11-20 09:14:39"},"1.1.4":{"tag":"1.1.4","author":"fahadmahmood","date":"2018-02-04 19:01:26"},"1.1.5":{"tag":"1.1.5","author":"fahadmahmood","date":"2018-07-13 21:21:55"},"1.1.6":{"tag":"1.1.6","author":"fahadmahmood","date":"2019-05-05 02:04:24"},"1.1.7":{"tag":"1.1.7","author":"fahadmahmood","date":"2019-05-05 02:04:24"},"1.1.8":{"tag":"1.1.8","author":"fahadmahmood","date":"2019-05-05 02:04:24"},"1.1.9":{"tag":"1.1.9","author":"fahadmahmood","date":"2019-11-17 04:00:40"},"1.2.0":{"tag":"1.2.0","author":"fahadmahmood","date":"2019-11-22 05:26:42"},"1.2.1":{"tag":"1.2.1","author":"fahadmahmood","date":"2019-12-09 15:45:42"},"1.2.2":{"tag":"1.2.2","author":"fahadmahmood","date":"2020-04-01 08:04:54"},"1.2.3":{"tag":"1.2.3","author":"fahadmahmood","date":"2020-06-03 06:22:02"},"1.2.4":{"tag":"1.2.4","author":"fahadmahmood","date":"2020-11-11 09:25:42"},"1.2.5":{"tag":"1.2.5","author":"fahadmahmood","date":"2021-09-11 02:36:03"},"1.2.6":{"tag":"1.2.6","author":"fahadmahmood","date":"2021-10-26 09:50:22"},"1.2.7":{"tag":"1.2.7","author":"fahadmahmood","date":"2022-01-11 19:54:16"},"1.2.8":{"tag":"1.2.8","author":"fahadmahmood","date":"2022-03-02 18:00:15"},"1.2.9":{"tag":"1.2.9","author":"fahadmahmood","date":"2022-07-14 14:27:36"},"1.3.0":{"tag":"1.3.0","author":"fahadmahmood","date":"2022-11-10 21:22:13"},"1.3.1":{"tag":"1.3.1","author":"fahadmahmood","date":"2023-05-24 01:01:59"},"1.3.2":{"tag":"1.3.2","author":"fahadmahmood","date":"2024-01-21 03:28:14"},"1.3.3":{"tag":"1.3.3","author":"fahadmahmood","date":"2024-05-21 17:10:29"},"1.3.4":{"tag":"1.3.4","author":"fahadmahmood","date":"2024-10-29 23:11:06"},"1.3.5":{"tag":"1.3.5","author":"fahadmahmood","date":"2025-01-07 08:18:02"}},"upgrade_notice":{"1.3.4":"<p>Fix: When enabling the order of the posts, it does not allow me to create new ones and the only way to create new ones was duplicating a previous post.<\/p>","1.3.3":"<p>Fix: PHP Notice:  Function is_home was called incorrectly.<\/p>","1.3.2":"<p>Updated version with the improved security checks.<\/p>","1.3.1":"<p>Updated version for WordPress.<\/p>","1.3.0":"<p>Fix: WP Sort Order was messing with posts date\/order.<\/p>","1.2.9":"<p>Fix: Categories sort order keeps reverting.<\/p>","1.2.8":"<p>Compatibility added for Stock Locations for WooCommerce.<\/p>","1.2.7":"<p>Ordering not working for taxonomies - undefined offset fixed in hooks.php file.<\/p>","1.2.6":"<p>Bootstrap and Fontawesome libraries are updated.<\/p>","1.2.5":"<p>Updated version for WordPress.<\/p>","1.2.4":"<p>On activation it was taking up some space at the header of the website pages - Fixed.<\/p>","1.2.3":"<p>Updated assets.<\/p>","1.2.2":"<p>New post menu_order implemented with 6 layers check.<\/p>","1.2.1":"<p>New post menu_order and page refresh issue resolved.<\/p>","1.2.0":"<p>get_current_screen() used.<\/p>","1.1.9":"<p>Languages added.<\/p>","1.1.8":"<p>User sort order refined for decimals.<\/p>","1.1.7":"<p>Table prefix issue has been fixed.<\/p>","1.1.6":"<p>User sort order refined.<\/p>","1.1.4":"<p>Sanitized input and fixed direct file access issues.<\/p>","1.1.3":"<p>Plugins can be sorted as well.<\/p>","1.1.1":"<p>A few improvements related to WordPress 4.6.<\/p>","1.1.0":"<p>A few improvements related to WordPress 4.5.0.<\/p>"},"ratings":{"1":2,"2":0,"3":0,"4":0,"5":15},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1361267,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":1362889,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2043131,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2597136,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.1.9","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5"],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":2317044,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":1361262,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2317044,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2317044,"resolution":"4","location":"assets","locale":""}},"screenshots":{"1":"How it works?","2":"Settings Page","3":"Installation &amp; Activation","4":"Settings Page - Full"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[141684,4648,22237,71040],"plugin_category":[],"plugin_contributors":[79969,231855],"plugin_business_model":[],"class_list":["post-42249","plugin","type-plugin","status-publish","hentry","plugin_tags-plugins-order","plugin_tags-post-order","plugin_tags-taxonomy-order","plugin_tags-user-order","plugin_contributors-fahadmahmood","plugin_contributors-invoicepress","plugin_committers-fahadmahmood","plugin_support_reps-acrobaticsjs","plugin_support_reps-codingchamp","plugin_support_reps-danialcooper","plugin_support_reps-ibulbworksupport","plugin_support_reps-jamescharles9","plugin_support_reps-jqueryacrobatics","plugin_support_reps-richiewatson"],"banners":{"banner":"https:\/\/ps.w.org\/wp-sort-order\/assets\/banner-772x250.png?rev=2597136","banner_2x":"https:\/\/ps.w.org\/wp-sort-order\/assets\/banner-1544x500.png?rev=2043131","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wp-sort-order\/assets\/icon-128x128.png?rev=1361267","icon_2x":"https:\/\/ps.w.org\/wp-sort-order\/assets\/icon-256x256.png?rev=1362889","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-sort-order\/assets\/screenshot-1.gif?rev=2317044","caption":"How it works?"},{"src":"https:\/\/ps.w.org\/wp-sort-order\/assets\/screenshot-2.png?rev=1361262","caption":"Settings Page"},{"src":"https:\/\/ps.w.org\/wp-sort-order\/assets\/screenshot-3.png?rev=2317044","caption":"Installation &amp; Activation"},{"src":"https:\/\/ps.w.org\/wp-sort-order\/assets\/screenshot-4.png?rev=2317044","caption":"Settings Page - Full"}],"raw_content":"<!--section=description-->\n<ul>\n<li><p>Author: <a href=\"https:\/\/www.androidbubbles.com\/contact\">Fahad Mahmood<\/a><\/p><\/li>\n<li><p>Project URI: <a href=\"http:\/\/androidbubble.com\/blog\/wordpress\/plugins\/wp-sort-order\">http:\/\/androidbubble.com\/blog\/wordpress\/plugins\/wp-sort-order<\/a><\/p><\/li>\n<li><p>License: GPL 3. See License below for copyright jots and titles.<\/p><\/li>\n<\/ul>\n\n<p>Order terms (Users, Posts, Pages, Custom Post Types and Custom Taxonomies) using a Drag and Drop with jQuery ui Sortable.<\/p>\n\n<p>Select sortable items from 'WP Sort Order' menu of Setting menu in WordPress.<\/p>\n\n<p>In addition, You can re-override the parameters of 'orderby' and 'order', by using the 'WP_Query' or 'pre_get_posts' or 'query_posts()'.<br \/>\nThe 'get_posts()' is excluded.<\/p>\n\n<p>At a glance by WordPress Mechanic:\n[youtube http:\/\/www.youtube.com\/watch?v=4ZiHUSBDJwY]<\/p>\n\n<h3>License<\/h3>\n\n<p>This WordPress Plugin is free software: you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version. This free software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this software. If not, see http:\/\/www.gnu.org\/licenses\/gpl-2.0.html.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload 'wp-sort-order' folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Select sortable items from 'WP Sort Order' menu of Setting menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20does%20it%20work%20with%20custom%20taxonomies%20and%20custom%20post%20types%3F'><h3>How does it work with custom taxonomies and custom post types?<\/h3><\/dt>\n<dd><p>[youtube http:\/\/www.youtube.com\/watch?v=-pLHSAALbGw]<\/p><\/dd>\n<dt id='how%20does%20it%20work%20with%20wordpress%20categories%3F'><h3>How does it work with WordPress Categories?<\/h3><\/dt>\n<dd><p>[youtube http:\/\/www.youtube.com\/watch?v=EKkf_54kUVU]<\/p><\/dd>\n<dt id='how%20to%20enable%20sorting%20for%20posts%2Fpages%20and%20taxonomies%20with%20this%20plugin%3F'><h3>How to enable sorting for posts\/pages and taxonomies with this plugin?<\/h3><\/dt>\n<dd><p>On settings page you can select posts\/pages and taxonomies to enable sorting.<\/p><\/dd>\n<dt id='can%20users%20be%20sorted%20with%20this%20plugin%3F'><h3>Can users be sorted with this plugin?<\/h3><\/dt>\n<dd><p>Yes, you can sort. And there is a shortcode to list users under taxonomy, terms and children. [WPSO_USERS slug=\"taxonomy or term slug\" id=\"taxonomy or term id\"]. This shortcode will list users on front-end with your sorted order. No need to write another query for it.<\/p><\/dd>\n<dt id='how%20to%20re-override%20the%20parameters%20of%20%27orderby%27%20and%20%27order%27'><h3>How to re-override the parameters of 'orderby' and 'order'<\/h3><\/dt>\n<dd><p><strong>Sub query<\/strong><\/p>\n\n<p>By using the 'WP_Query', you can re-override the parameters.<\/p>\n\n<ul>\n<li><p>WP_Query<\/p>\n\n 'date',\n    'order' =&gt; 'DESC',\n) ) ?&gt;<\/li>\n<\/ul>\n\n<p><strong>Main query<\/strong><\/p>\n\n<p>By using the 'pre_get_posts' action hook or 'query_posts()', you can re-override the parameters.<\/p>\n\n<ul>\n<li><p>pre_get_posts<\/p>\n\n<p>function my_filter( $query )\n{\n    if ( is_admin() || !$query-&gt;is_main_query() ) return;\n    if ( is_home() ) {\n        $query-&gt;set( 'orderby', 'date' );\n        $query-&gt;set( 'order', 'DESC' );\n        return;\n    }\n}\nadd_action( 'pre_get_posts', 'my_filter' );<\/p><\/li>\n<li><p>query_posts()<\/p>\n\n 'rand'\n) ); ?&gt;<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3.4<\/h4>\n\n<ul>\n<li>Fix: When enabling the order of the posts, it does not allow me to create new ones and the only way to create new ones was duplicating a previous post. [Thanks to Carlos][30\/10\/2024]<\/li>\n<\/ul>\n\n<h4>1.3.3<\/h4>\n\n<ul>\n<li>Fix: PHP Notice:  Function is_home was called incorrectly. [Thanks to @goose1984 \/ Cotton Jamie][21\/05\/2024]<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Updated version with the improved security checks. [Thanks to patchstack.com \/ CatFather][21\/01\/2024]<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Updated version for WordPress. [24\/05\/2023]<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Fix: WP Sort Order messing with posts date\/order. [Thanks to Gonzalo\/@jamposta][11\/11\/2022]<\/li>\n<\/ul>\n\n<h4>1.2.9<\/h4>\n\n<ul>\n<li>Fix: Categories sort order keeps reverting. [Thanks to saschaprinzip][14\/07\/2022]<\/li>\n<\/ul>\n\n<h4>1.2.8<\/h4>\n\n<ul>\n<li>Compatibility added for Stock Locations for WooCommerce. [02\/03\/2022]<\/li>\n<\/ul>\n\n<h4>1.2.7<\/h4>\n\n<ul>\n<li>Ordering not working for taxonomies - undefined offset fixed in hooks.php file. [Thanks to apapadakis][12\/01\/2022]<\/li>\n<\/ul>\n\n<h4>1.2.6<\/h4>\n\n<ul>\n<li>Bootstrap and Fontawesome libraries are updated. [26\/10\/2021]<\/li>\n<\/ul>\n\n<h4>1.2.5<\/h4>\n\n<ul>\n<li>Updated version for WordPress.<\/li>\n<\/ul>\n\n<h4>1.2.4<\/h4>\n\n<ul>\n<li>On activation it was taking up some space at the header of the website pages - Fixed. [Thanks to code naira]<\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>PHP warning fixed. [Thanks to @hastibe]<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>New post menu_order implemented with 6 layers check. [Thanks to Fahad Mahmood &amp; Abdul Razzaq]<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>New post menu_order and page refresh issue resolved. [Thanks to @thisleenoble]<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>get_current_screen() used. [Thanks to ricjoh]<\/li>\n<\/ul>\n\n<h4>1.1.9<\/h4>\n\n<ul>\n<li>Languages added. [Thanks to Abu Usman]<\/li>\n<\/ul>\n\n<h4>1.1.8<\/h4>\n\n<ul>\n<li>User sort order refined for decimals. [Thanks to Joe Garcia]<\/li>\n<\/ul>\n\n<h4>1.1.7<\/h4>\n\n<ul>\n<li>Table prefix issue has been fixed. [Thanks to Columbird]<\/li>\n<\/ul>\n\n<h4>1.1.6<\/h4>\n\n<ul>\n<li>User sort order refined. [Thanks to Joe Garcia]<\/li>\n<\/ul>\n\n<h4>1.1.4<\/h4>\n\n<ul>\n<li>Sanitized input and fixed direct file access issues.<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Plugins can be sorted as well.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>A few improvements related to WordPress 4.6.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>A few improvements related to WordPress 4.5.0.\nInitial Release<\/li>\n<\/ul>","raw_excerpt":"Order terms (Users, Posts, Pages, Custom Post Types and Custom Taxonomies) using a Drag and Drop with jQuery ui Sortable.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/42249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=42249"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/fahadmahmood"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=42249"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=42249"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=42249"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=42249"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=42249"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=42249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}