I Order Terms

توسط

Plugin can be used for reordering categories, tags and custom taxonomies. This plugin is primarily intended as an aid to theme developers.

Plugin supports multisite installation.

Requirements

The minimum requirement is that you have at least WordPress 3.5 installed.

Example usage

Fetching sorted terms from a custom taxonomy will be enabled by default:

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

Warning

Plugin adds a new column to the ‘term_taxonomy’ table, make sure to backup your database before installing. Column is removed when you delete the plugin.

  1. You can download and install “I Order Terms” plugin by using the built-in WordPress plugin installer. Or you can upload plugin folder “i-order-terms” manually to your “/wp-content/plugins/” directory.
  2. Activate the plugin through the “Plugins” menu in WordPress.
  3. You will need to enable plugin for taxonomy that you wish to sort.

Enabling plugin for taxonomy

You can use the settings page or add code in your function file. There are two options you can use to make taxonomy sortable:

1) You can enable sorting when registering taxonomy:

register_taxonomy( 'your-taxonomy-name', 'your-post-type', array(
    'label' => __('Category'),

    // this parameter is used to enable
    // sorting for taxonomy 'your-taxonomy-name'
    'i_order_terms' => true,
));

2) Other option is to pass an 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.

سوالات متداول

Will this work on WordPress multisite?

Yes, it will work on multisite installation.

What permissions are required for users to reorder terms?

User needs to have “manage_categories” permission to be able to order terms.

Where can I report a bug?

You can report bugs from the contact form on my website at https://www.igorware.com/contact.
Please make sure to include plugin version when reporting bugs.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
نسخه حجم فایل SHA256 تغییرات دانلود
1.5.3 23 کیلوبایت -
دانلود
×
★★★★★
★★★★★
5.0 /5 (11 نظر)

قیمت:

رایگان

نگارش

1.5.3

آخرین انتشار

14 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

1,000+

نگارش وردپرس

وردپرس 3.5+

تست شده از نسخه

وردپرس 6.9.4

نگارش PHP

PHP 5.6+

تگ ها

نسخه ها

1 نسخه