News

Taxonomy Terms Order and Auto Sort, Admin Sort description an usage

The Taxonomy Terms Order plugin is an easy way to control the sort for any taxonomies.  The order is applied to the front side using the arguments:

‘orderby’ => ‘term_order’,

Example:


$argv = array(	 	 
		'orderby' => 'term_order' 	 
		);	 	 
get_terms('category', $argv);

 

 

Autosort OFF
No query sort will be changed, the terms will appear in the original order, per orderby argument. To retrieve the terms in the customised order you must use the term_order on the orderby parameter:


$argv = array(	 	 
		'orderby' => 'term_order',	 	 
		'hide_empty' => false	 	 
		);	 	 
get_terms('category', $argv);

See more info on the get_terms usage here

Autosort ON
The queries will be updated, all terms will appear in the order you manually defined. This is recommended if you don’t want to change any theme code to apply the terms order

 

Admin Sort
The code queries will be updated within the admin interface, the sort will also apply on this area too.

How to use the AutoSort setting for Advanced Taxonomy Terms Order

The Advanced Taxonomy Terms Order include a great functionality, the AutoSort. This helps to auto-apply the customized sorting to front side, or allow a manual apply through code.
There are 2 modes for this option, On and OFF.

ON
The query will be updated (unless you manually change that from a specific Taxonomy Order menu), any orderby parameter will be changed to term_order. Practically all queries will be forced to use the new order. This is recommended if you don’t want to change any theme code to apply the terms order.

OFF
The query will not be touched (unless you manually change that from a specific Taxonomy Order menu), all terms will be retrieved in the same order as before. To retrieve the terms per customized sorting, you must use the term_order on the orderby parameter::

$argv = array(
                'orderby'       =>  'term_order',
                'hide_empty'    => false
                );
get_terms('category', $argv);

More info on the get_terms usage can be found at http://codex.wordpress.org/Function_Reference/get_terms

Randomize a sort every two hours, or a custom defined interval

Creating randomize sort never been easier, custom intervals can be set to whatever time-frame ins need. The sort will random the posts or any custom post types order. (more…)

Applying automatic order for a sort through a user function callback

Starting version 3.5.2 a new functionality has been implemented, Through a callback user function certain order can apply to a sort. This is run automatically on sort match, meaning no manual order maintenance is required. This is useful when no manual sort intend to be used due to complexity or maintenance requirement time, on automatic order fallback, a sort which can’t be achieved through existing interface functionality, etc

advanced-post-types-order-automatic-user-callback-function (more…)

WooCommerce – Sort Products which belong to multiple categories

woo-commerce-logo

Probably the best choice for e-commerce under a WordPress environment, WooCommerce deliver all the juice you need for a successfully e-commerce business.  WooCommerce is built using WordPress best practices both on the front and the back end. This results in an efficient, robust and intuitive plugin. (more…)

Apply custom sorting for Next / Previous site-wide navigation

A sort will apply to all next / previous side-wide navigation links if the Next / Previous Apply option is turned on. In case this need to apply only when certain conditions are fulfilled .
The follogin filter can be used ‘apto/navigation_sort_apply’

     add_filter('apto/navigation_sort_apply', 'theme_apto_navigation_sort_apply');
    function theme_apto_navigation_sort_apply($current)
        {
            global $post;
            
            if($post->post_type == 'post')
                $current    =   TRUE;
                else
                $current    =   FALSE;
            
            return $current;   
        }

The above will makes the code to apply the customized sort on navigation links only if post type is a Post.

*This replaced the old cpto/navigation_sort_apply

Sample code on how to apply the sort for Post Types Order plugin

The Post Types Order plugin is a great tool for sorting site content. It include the Autosort functionality, if turned on will auto-apply the customized order to all queries, there’s no need to modify any code. This makes it the ideal tool for people who don’t care about programming and just want an out-of-the-box tool.

Sort can also apply only to certain queries, the Autosort need to be turned OFF. The ‘orderby’ => ‘menu_order’ need to be included within custom query arguments.

$args = array(
              'post_type' => 'feature',
              'orderby'   => 'menu_order',
              'order'     => 'ASC'
            );
$my_query = new WP_Query($args);
while ($my_query->have_posts())
    {
        $my_query->the_post();
        (..your code..)          
    }

The sort can be reversed using the ‘order’ => ‘DESC

$args = array(
              'post_type' => 'feature',
              'orderby'   => 'menu_order',
              'order'     => 'DESC'
            );

When using Autosort, there is a filter pto/posts_orderby/ignore to ignore specific queries, more details at Ignore sort apply for certain query on Post Types Order

For advanced queries and sorts see the Advanced Post Types Order and it’s Documentation.

How to set Sticky posts using Advanced Post Types Order

Starting plugin version 3.1.5, Sticky functionality is a great way to optimize your website, by keeping content updated and most valuable information on top of other data.
Set Fixed Position (Sticky) for objects in the list so they will always show first. When publishing new posts, the sticky objects will stay in same position as defined.

advanced-post-types-order-admin-interface-sticky-interface

A sticky position is defined by a number, which will set the post as fixed position in the list.

advanced-post-types-order-admin-interface-sticky-interface-numbering

Conditionals and sort query rules can apply, for making a sort to match exact section of your site (i.e. front page, archive, search etc). This helps to promote (keep in same position) certain articles, posts, ads, general data which is important for SEO and Marketing campaigns. – See more at: https://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/

Customise order for WPML content with Advanced Post Types Order

The most versatile and flexible WordPress plugin which turn your website into a multilingual ready, called WPML become a unique piece of code which is a must have. those days. Easy to use, intuitive to navigate, publish and you are ready to go multilingual.

Recently many WordPress themes and plugins had designed for WPML compatibly, our plugin does the same and received a officially Certificate of Compatibility

Advanced-Post-Types-Order-Plugin-certificate-of-WPML-compatibility

(more…)

Advanced Post Types Order – Documentation and Usage

Documentation and Usage for Advanced Post Type Order plugin regarding installation, sort lists creation, sort settings, simple / complex sort types, manual / automatic order type, sort conditionals.
This section is constantly updated as new features are included in the plugin