サポート » 使い方全般 » ACF オプションページの並べ替え

  • 解決済 fuuc0238

    (@fuuc0238)


    Advanced Custom Fields Proを使用しますと
    オプションページを追加する事が可能で、ダッシュボードサイドバーにオプションページを表示し、
    その仮名にカスタムフィールドを制作することが可能なのですが、
    制作自体は問題なく制作はできるのですが、表示順を並び替えする事ができず、困っております。
    プラグインでは、問題なく移動できるのですが、プラグインの場合バージョンによる不具合対応等で
    あまりプラグインを使用しておりません。

    //左メニューの順番を変える

    function custom_menu_order($menu_ord) {
    	if (!$menu_ord) return true;
    	return array(
    		'index.php', // ダッシュボード
    		'separator1', // 最初の区切り線
    		'edit.php?post_type=blog', // ブログ
    		'edit.php?post_type=information', // お知らせ
    		'upload.php', // Media
    		'separator3', // 区切り線
    		'edit.php?post_type=page', // 固定ページ
    		'themes.php', // 外観
    		'options-general.php', // 設定
    		'users.php', // ユーザー
    		'separator4', // 区切り線
    		'plugins.php', // プラグイン
    		'separator-last', // 最後の区切り線
    	);
    }
    add_filter('custom_menu_order', 'custom_menu_order'); // Activate custom_menu_order
    add_filter('menu_order', 'custom_menu_order');

    追加したオプションページ

    if ( function_exists( 'acf_add_options_page' ) ) {
      acf_add_options_page( array(
        'page_title' => '基本情報',
        'menu_title' => '基本情報',
        'menu_slug' => 'theme-options',
        'capability' => 'edit_posts',
        'parent_slug' => '',
        'icon_url' => 'dashicons-admin-users',
        'redirect' => false
      ) );
    }

    順番を入れ替えるため

    'edit_posts?add_menu_page=theme-options'
    'edit.php?post_type=theme-options'
    'edit.php?add_menu_page=theme-options'

    オプションページの並べ変えは通常の並べ替えでは行えないのでしょうか?

1件の返信を表示中 - 1 - 1件目 (全1件中)
  • トピック投稿者 fuuc0238

    (@fuuc0238)

    補足です。
    'admin.php?page=theme-options'
    を入れた場合エラーでWordPressが表示されなくなってしまいます。

1件の返信を表示中 - 1 - 1件目 (全1件中)
  • トピック「ACF オプションページの並べ替え」には新たに返信することはできません。