0

外観の下に機能「メニュー」を設定するためにここで見逃しているのは何ですか?

新しいテーマを作っています。

次のコードウィッチにメニューを定義してもらいましたが、画像でわかるように表示されなくなります。

どうもありがとう

header.php

<nav id="access" role="navigation">
                <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
                <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
                <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>

                <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
                <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
            </nav><!-- #access -->

function.php

// This theme uses wp_nav_menu() in one location.
    register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) );

index.php

<?php twentyeleven_content_nav( 'nav-above' ); ?>

ここに画像の説明を入力してください

4

1 に答える 1

0

Functions.phpファイルでメニューサポートがオンになっていることを確認してください。

    if (function_exists('add_theme_support')) {
          add_theme_support('menus');
    }

詳細はこちら: http ://templatic.com/news/wordpress-3-0-menu-management/

于 2012-09-27T19:09:46.847 に答える