menu_positionを5にしても反映しない
-
カスタム投稿タイプを追加し、function.phpの記述を
‘menu_position’ => 5,
としたのですが、固定ページの下に配置されます。
試しに10にしてみると、外観の下に配置されます。カスタム投稿タイプは3つ設けてあって、この3つは投稿の下に配置されて稼働しています。
今回、新たに一つカスタム投稿タイプを追加したところ、追加した分の配置がおかしくなりました。コードは下記です(カスタム投稿タイプ名の個所だけ代替文言にしています)。
//+++++++++++++++++++++++++++++++++++++++++ //カスタム投稿タイプを追加 /*** カスタム投稿 AAA ***/ add_action( 'init', 'create_AAA_post_type' ); function create_AAA_post_type() { register_post_type( 'AAA', array( 'labels' => array( 'name' => __( 'AAA' ), 'singular_name' => __( AAA' ) ), 'public' => true, 'supports' => array( 'title', 'author', 'editor'), 'has_archive' => true, 'menu_position' => 5, ) ); } /*** カスタム投稿 BBB ***/ add_action( 'init', 'create_BBB_post_type' ); function create_BBB_post_type() { register_post_type( 'BBB', array( 'labels' => array( 'name' => __( 'BBB' ), 'singular_name' => __( 'BBB' ) ), 'public' => true, 'supports' => array( 'title', 'author', 'editor'), 'has_archive' => true, 'menu_position' => 5, ) ); } /*** カスタム投稿 CCC ***/ add_action( 'init', 'create_CCC_post_type' ); function create_CCC_post_type() { register_post_type( 'CCC', array( 'labels' => array( 'name' => __( 'CCC' ), 'singular_name' => __( 'CCC' ) ), 'public' => true, 'supports' => array( 'title', 'author', 'editor'), 'has_archive' => true, 'menu_position' => 5, ) ); } /*** カスタム投稿 DDD ***/ add_action( 'init', 'create_DDD_post_type' ); function create_DDD_post_type() { register_post_type( 'DDD', array( 'labels' => array( 'name' => __( 'DDD' ), 'singular_name' => __( 'DDD' ) ), 'public' => true, 'supports' => array( 'title', 'author', 'editor'), 'has_archive' => true, 'menu_position' => 5, ) ); } //+++++++++++++++++++++++++++++++++++++++++
よろしくお願いします。
3件の返信を表示中 - 1 - 3件目 (全3件中)
3件の返信を表示中 - 1 - 3件目 (全3件中)
- トピック「menu_positionを5にしても反映しない」には新たに返信することはできません。