WP PLUGIN アーカイブ毎に投稿表示順を設定する

・ファイル名、クラス名の変更
・タクソノミーの有効化で、カテゴリー、タグ、カスタム分類のメタキーを分割
・表示用クラスの追加
・readmeの追加等
This commit is contained in:
2021-05-04 15:57:30 +09:00
parent 2ed2b25194
commit 7722f53f10
12 changed files with 409 additions and 211 deletions
+22
View File
@@ -0,0 +1,22 @@
jQuery(function ($) {
let cat_ul_count = $('.post-order-list').length; //カテゴリ総数
for (let i = 0; i < cat_ul_count; i++) {
let my_list = $('.post-order-list:eq(' + i + ')');
my_list.sortable(
{
update: function () {
let list_count = $('.product-list', my_list).length;
for (let j = 0; j < list_count; j++) {
let list_order = j + 1;
$('.list_order:eq(' + j + ')', my_list).val(list_order);
$('.list_order:eq(' + j + ')', my_list).siblings('.sort-num-label').text(list_order);
}
}
}
);
my_list.disableSelection();
}
});