Documentation - Getting Started - Create sort for mix of single / multiple custom post types, taxonomies, meta, authors

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

Create sort for mix of single / multiple custom post types, taxonomies, meta, authors

The plugin allows to create customized sort lists which will apply for a very specific query, meaning a mix of multiple port types, or/and multiple taxonomies and terms, or/and custom fields – meta, or/and authors etc. Practically this allow to create a sort for controlling any part of your site. A Case Study with additional description can be found at Creating sort for a complex front side theme query

First go to Re-Order interface where the new sort is required to show. Click the + tab which allow to create a new sort:

advanced-post-types-order-interface-new-sort-tab

Click the Show Advanced button located on top right of Sort Settings interface, this will expand the Query Rules section revealing additional options.

advanced-post-types-order-admin-interface-post-type-advanced-query

The interface allow to specify the custom post types. In case of multiple Add Post Type button can be used to create more. If need taxonomy, Term/Terms can be selected and Taxonomy Operator specified. In case of multiple taxonomies, Add Taxonomy button can be used to create another taxonomy rule.

advanced-post-types-order-admin-interface-post-type-advanced-query-example

Save the sort list using Create button.
All post objects which match the sort queries appear on the re-order interface. Using the drag and drop functionality the sort can be customized. In case of using Auto Sort, the order is updated automatically for all query which match this sort, no changes are required to your theme. If Auto Sort is turned off, order can be applied by including the ‘orderby’ => ‘menu_order’ within the query parameters, more details can be found at Sample Usage

Such advanced sort lists, can be used to allow specific users (i.e. editors, or a certain user id, see filters area) to control the sorting for a certain area of website and not everything.