All Projects → 10up → simple-page-ordering

10up / simple-page-ordering

Licence: GPL-2.0 license
Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
shell
77523 projects
SCSS
7915 projects

Projects that are alternatives of or similar to simple-page-ordering

wp-tag-order
↕︎ Sort tags manually in individual posts (not site-globally) on WordPress.
Stars: ✭ 16 (-81.82%)
Mutual labels:  drag-and-drop, order
bcx-aurelia-reorderable-repeat
An Aurelia repeater supports drag & drop reordering automatically.
Stars: ✭ 20 (-77.27%)
Mutual labels:  reorder, reordering
dnd
Beautiful and accessible drag and drop for lists with React.
Stars: ✭ 271 (+207.95%)
Mutual labels:  drag-and-drop, reordering
Sortable
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
Stars: ✭ 23,641 (+26764.77%)
Mutual labels:  drag-and-drop, reordering
React Beautiful Dnd
Beautiful and accessible drag and drop for lists with React
Stars: ✭ 25,810 (+29229.55%)
Mutual labels:  drag-and-drop, reordering
Lxreorderablecollectionviewflowlayout
Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.
Stars: ✭ 1,831 (+1980.68%)
Mutual labels:  drag-and-drop, reordering
Fileuploader
Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
Stars: ✭ 111 (+26.14%)
Mutual labels:  drag-and-drop, ajax
PageQueryBoss
A ProcessWire Module to build complex nested queries containing multipple fields and pages and return an array that can be parsed to JSON. This is usefull to fetch data for SPA and PWA.
Stars: ✭ 18 (-79.55%)
Mutual labels:  ajax, page
react-page-swapper
An orchestrator that eases out the implementation of page transitions
Stars: ✭ 16 (-81.82%)
Mutual labels:  page
react-file-input
⚛️  A file Input, with drag'n'drop and image editor for React
Stars: ✭ 71 (-19.32%)
Mutual labels:  drag-and-drop
UI-Builder
UI Builder to generate html pages automatically
Stars: ✭ 33 (-62.5%)
Mutual labels:  drag-and-drop
larashop55
Shopping cart website in Laravel 5.5 with Ajax
Stars: ✭ 51 (-42.05%)
Mutual labels:  ajax
node-bitstamp
bitstamp REST and WS API Node.js client 💵
Stars: ✭ 58 (-34.09%)
Mutual labels:  order
palmerye.github.io
📝 Personal Blog
Stars: ✭ 17 (-80.68%)
Mutual labels:  pages
alphabetical-sorter
VScode extension - For variable alphabetical re-order
Stars: ✭ 30 (-65.91%)
Mutual labels:  order
vuepress-plugin-autometa
Auto meta tags plugin for VuePress 1.x
Stars: ✭ 40 (-54.55%)
Mutual labels:  page
nova-select-plus
A Laravel Nova Select Field
Stars: ✭ 67 (-23.86%)
Mutual labels:  ajax
reactablejs
A react high-order component for interact.js(drag and drop, resizing and multi-touch gestures).
Stars: ✭ 59 (-32.95%)
Mutual labels:  drag-and-drop
sekoliko
Sekoliko | MySchool | MonEcole : School management Software.
Stars: ✭ 39 (-55.68%)
Mutual labels:  ajax
dnde
Drag and drop react email editor
Stars: ✭ 31 (-64.77%)
Mutual labels:  drag-and-drop

Simple Page Ordering

Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.

Support Level Release Version WordPress tested up to version GPLv2 License

Order your pages and other custom post types that support "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.

Want to help? Check out our contributing guidelines to get started.

Installation

  1. Install either via the WordPress.org plugin directory, or by uploading the files to your server.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Get to work reordering your content!

Frequently Asked Questions

Why can't I reorder my posts?

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' );

Can I make my custom post type take advantage of this plug-in?

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.

I want my non-hierarchical post type to be sortable. Help!

See the previous two answers - just add page-attributes to the list of supported post type features.

I reordered my posts, but the order didn't change on the front end of my site!

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

I reordered my content, it seemed to work, but when I refreshed, it went back to the old order!

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.

What happened to the drop down box that let me change the number of items on each page in the admin?

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.

How can I modify sortable post types?

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 );

Can I use REST to order posts?

Yes. The plugin registers the REST endpoint simple-page-ordering/v1/page_ordering.

Input parameters

Name Type Description Mandatory Default value
id integer The ID of the post you are positioning yes
previd integer The ID of the post previous to the one you want to position yes
nextid integer The ID of the post next to the one you want to position yes
start integer The start index no 1
exclude array Array of post IDs to be excluded no empty array

Example request

Type URL
post /wp-json/simple-page-ordering/v1/page_ordering/?id=2&previd=13&nextid=14&excluded=[]

Support Level

Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

Changelog

A complete listing of all notable changes to Simple Page Ordering are documented in CHANGELOG.md.

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers, contributors, and libraries for Simple Page Ordering.

Like what you see?

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].