News

Change default ‘X domains per key’ with arbitrary text within WooCommerce Software License

As default the WooCommerce Software License plugin output a ‘X domains per key’ within order page, client and admin e-mails, my account areas etc. This because is presumed the purchasable is being linked to a domain (e.g. a downloadable software).

But this is not necessarily to say that way, arbitrary texts can be used depending on the Product type and profile. (more…)

Use a simple sort along with complex queries

Advanced Post Types Order Simple Sort is an easy way to maintain order for different queries/sections (e.g. archive, taxonomies) within a single interface. As opposite an Advanced Sort can match a single query but which include a mix of posts, taxonomies, meta data and other parameters. This is a powerful tool which allow to match a sort virtually for any WordPress Queries, however it require specific sort settings to match exactly the front site query parameters. For that reason it can get a bit hard to manage for dynamic section which use a large number of complex queries.
(more…)

Hide and increase Security for your WordPress website

Say Hello to WP Hide & Security Enhancer a brand new plugin which provide an easy way to completely hide your WordPress core files, theme and plugins path from being show on front side. This is a huge improvement over Site Security, no one will know you actually run a WordPress. Provide a simple way to clean up html by removing all WordPress fingerprints.
(more…)

Add WooCommerce Shop Manager custom role for Advanced Post Types Order sorts

As described at Filter – Add Custom Role / Modify exiting – Minimum capability to use this plugin custom role can be append to existing list. This is not something to be included automatically, as custom roles rely on capabilities, so it need one to selected. (more…)

Default sort list for every new Site in your WordPress MultiSite environment

WordPress MultiSite environment is a great way to create a network of sites, easily managed from a common dashboard. The Advanced Post Types Order plugin is fully compatible with MultiSite set-up, it can be activated either on punctual site or network wide. (more…)

Customize sorting for products within a customer Order

Within a WooCommerce buyer Order, the products are being sorted / displayed in the way they where placed in the cart. Unfortunate WooCommerce does not provide any support through which such sorting can be changed.

woocommerce-sort-products-within-customer-order
(more…)

How to expand / narrow a sort settings within admin interface

The Advanced Post Types Order plugin include quite many options to cover up all possible scenarios. For that reason the sort settings admin interface it’s long, depending on monitor resolution it may not fit within a full screen size so the scroll need to be used to access all options.

Since the actual sorting interface is positioned under the Sort Settings area, it may be a bit annoying to keep scroll down the page until that section. A nice functionality is the possibility to collapse / expand the settings area making the actual sort interface visible right from the page load.
(more…)

Ignore sort apply for certain query on Post Types Order

This replaced the deprecated filter pto/posts_orderby

The free WordPress plugin Post Types Order is already a “must have” code on any website. Control any post sorting through a nice and easy to use interface.

When Autosort is ON, the sorting is applied to all queries that match the post type. It can be forced by either using the ignore_custom_sort argument within the query , or by using a filter pto/posts_orderby/ignore which can be placed within any code, preferable on theme functions.php

Example
The following code ignore the sort apply for any query which include ‘reports’ post type

	add_filter('pto/posts_orderby/ignore', 'theme_pto_posts_orderby', 10, 3);
    function theme_pto_posts_orderby($ignore, $orderBy, $query)
       {
           if( (! is_array($query->query_vars['post_type']) && $query->query_vars['post_type'] == 'reports') || 
                   (is_array($query->query_vars)   &&  in_array('reports', $query->query_vars)))
                   $ignore = TRUE;
           
           
           return $ignore;
       }

Apply post type Archive order for all taxonomies / categories

The Advanced Post Types Order plugin is very flexible in functionality. In certain situations, individual sort for each taxonomy terms (categories) is not required, but instead Archive order is needed to apply on all other sections.

The following example return the archive order for any query that match the post type array. The apto/query_match_sort_id filter is being used:
(more…)

Hide Sort Settings interface for certain administrator role users

The Sort Settings interface is available by default only to administrator role users. There are situations when sort settings need to be available only for certain users. The apto/wp-admin/reorder-interface/view-settings-capability filter help on that matter.

The following example hide the sort settings interface if logged-in user is not ID 1 or 2 or 3. This can be extended to check against username, user meta data etc. If not match it should return a capability that current user does not support.

add_filter('apto/wp-admin/reorder-interface/view-settings-capability', 'view_settings_capability');
    function  view_settings_capability($capability)
        {
            $user_ID = get_current_user_id();
            
            if(!in_array($user_ID, array(1, 2, 3)))
                $capability =   '_sort_capability_';
            
            return $capability;   
        }