开发者 | x64igor |
---|---|
更新时间 | 2019年7月3日 06:49 |
PHP版本: | 3.5 及以上 |
WordPress版本: | 5.2 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
$terms = get_terms( 'your-taxonomy-name' );
If you wish to sort by name (disable plugin's custom sorting) you will have to set 'i_order_terms' to 'false':
$terms = get_terms( 'your-taxonomy-name', 'i_order_terms=0' );
警告
Plugin ads new column to 'term_taxonomy' table, make sure to backup your database before installing. Column is removed when you delete plugin.
1. Other option is to pass array of taxonomies (or tags/categories) via filter "i_order_terms_taxonomies" in your functions file like this:
function custom_i_order_terms_taxonomies($taxonomies) { $taxonomies = array_merge($taxonomies, array('taxonomy', 'category')); return $taxonomies; } add_filter('i_order_terms_taxonomies', 'custom_i_order_terms_taxonomies');`
This will enable taxonomy sorting for 'taxonomy' and 'category' taxonomies.
Naturally you will have to provide your taxonomy names.Yes, it will work on multisite installation.
User needs to have "manage_categories" permission to be able to order terms.
You can report bugs from contact form on my website at http://www.igorware.com/contact. Please make sure to include plugin version when reporting bugs.