Order your pages and other custom post types that support "page-attributes" with simple drag and drop right from the standard page list.
Order your pages, hierarchical custom post types, or custom post types with “page-attributes” with simple drag and drop right from the built in page list.
Simply drag and drop the page into the desired position. It’s that simple. No new admin menus pages, no clunky, bolted on user interfaces. Just drag and drop on the page or post-type screen.
The plug-in is “capabilities aware” – only users with the ability to edit others’ pages (editors and administrators) will be able to reorder content.
Integrated help is included: just click the “help” tab at the top right of the screen.
Please note that the plug-in is not compatible with Internet Explorer 7 and earlier, due to limitations within those browsers.
We’d love to have you join in on development over on GitHub.
Generic posts are not displayed by menu order – they’re displayed by chronology. You can theoretically add menu ordering to posts in your code (theme functions.php, plug-in) by using:
add_post_type_support( 'post', 'page-attributes' );
Yep. When you register the post type, include the page-attributes
feature in the support list. This will add a Sort by Order
option to the filter links above the drop downs. Once you sort by order, you can drag and drop the content.
'supports' => array( 'title', 'editor', 'page-attributes' ),
Alternatively, when you register the post type, set hierarchical
to true
– hierarchical post types natively order by menu order.
You can also take advantage of the simple_page_ordering_is_sortable
filter, which passes the result of the default check and the post type name, to override default behavior.
See the previous two answers – just add page-attributes
to the list of supported post type features.
This plug-in doesn’t change any behavior on the front end, it simply changes the menu order stored in WordPress.
If you want a list of pages or custom post types to display in that defined order, you must change the post query’s orderby
parameter to menu_order
(if it’s not already).
This most likely means the AJAX request – the server side code – failed after you dropped the content into the new position. Some shared hosts aggressively time out and limit AJAX requests. Version 2.0 batches these requests so you can try reducing the number of items it updates on each request using a filter in your theme’s functions.php or a custom plug-in:
add_filter( 'simple_page_ordering_limit', function($number) { return 5; } );
Where 5 is the number of items to batch on each request (the default is 50). Note that this example uses PHP 5.3+ callback functions, so if you’re still on PHP 5.2, you’ll need to add a traditional callback.
This feature is already built into WordPress natively, but a bit tucked away. If you pull down the “Screen Options” tab up top (on the list of post objects) there’s a field where you can specify the number of items to show per page. I decided it was not a very good practice to duplicate this.
Post types can be included or excluded by using the simple_page_ordering_is_sortable
filter.
For example, to exclude the excluded_post_type
custom post type, add the following snippet in the theme function file or custom plugin:
add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) { if ( 'excluded_post_type' === $post_type ) { return false; } return $sortable; }, 10, 2 );
To include the include_post_type
custom post type, add the following snippet in the theme function file or custom plugin:
add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) { if ( 'include_post_type' === $post_type ) { return true; } return $sortable; }, 10, 2 );
Yes. The plugin registers the REST endpoint simple-page-ordering/v1/page_ordering
.
CONTRIBUTING.md
file (props @kmgalanakis, @jeffpaul via #202).get_walked_pages
for custom post types (props @sissibieber, @zachgibb, @peterwilsoncc, @mjot, @jeffpaul via #200).@wordpress/html-entities
package (props @helen, @jeffpaul, @psorensen, @peterwilsoncc via #189).node
version from 16
to 20
and clean up NPM dependencies (props @Sidsector9, @dkotter via #188).@babel/traverse
from 7.20.12
to 7.23.6
(props @dependabot, @ravinderk via #184).sharp
from 0.30.7
to 0.32.1
(props @dependabot, @Sidsector9 via #182).10up-toolkit
from 4.3.1
to 5.2.2
(props @dependabot, @Sidsector9 via #182).wp-compat-validation-tool
composer package to version 0.3.1
which properly removes the .git
directory (props @Sidsector9, @dkotter via #180).10up-lib
directory (props @Sidsector9, @dkotter via #175).@babel/traverse
from 7.20.12
to 7.23.2
(props @peterwilsoncc via #170).word-wrap
from 1.2.3 to 1.2.4 (props @dependabot, @peterwilsoncc via #).tough-cookie
from 4.1.2 to 4.1.3 (props @faisal-alvi via #152).node-sass
from 7.0.3 to 9.0.0 (props @faisal-alvi via #152).@cypress/request
from 2.88.11 to 3.0.0 to resolve SSRF issue (props @faisal-alvi, @iamdharmesh, @peterwilsoncc, @dkotter via #152, #160).Note that this release bumps the minimum required versions of PHP from 5.6 to 7.4 and WordPress from 3.8 to 5.7.
cypress
from 9.5.2
to 11.2.0
(props @iamdharmesh, @jayedul, @Sidsector9) via #120.http-cache-semantics
from 4.1.0 to 4.1.1 (props @peterwilsoncc via #131).webpack
from 5.75.0
to 5.76.1
(props @Sidsector9) via #134.Active
to Stable
(props @jeffpaul, @dkotter via #123).build-zip
action (props @iamdharmesh, @faisal-alvi, @dkotter via #119).loader-utils
from 2.0.3 to 2.0.4 (props @dependabot via #115).simple-git
from 3.12.0 to 3.15.1 (props @dependabot via #121).