当サイト、Codex 日本語版は今後積極的な更新は行わない予定です。後継となる新ユーザーマニュアルは、https://ja.wordpress.org/support/ にあります。
万が一、当サイトで重大な問題を発見した際などは、フォーラムWordSlack #docs チャンネルでお知らせください。</p>

管理画面/外観/メニュー

提供: WordPress Codex 日本語版
< 管理画面‎ | 外観
2010年6月21日 (月) 07:35時点におけるMizuno (トーク | 投稿記録)による版 (表示オプション: まで翻訳.)

移動先: 案内検索

このページ「管理画面/外観/メニュー」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています

外観 → メニュー

Appearance Menus SubPanel は、Version 3.0 から利用可能です。テーマのデフォルトメニューの代わりにカスタムメニューを使用するには、テーマの functions.php ファイル でこの機能を登録しておく必要があります。

管理パネル に戻る。


Appearance Menus SubPanel

表示オプション

表示オプションで、サブパネルにどのモジュールを表示する/しないを選択可能です。表示オプションタブをクリックすると、可能なモジュールとオプションの一覧が表示されます。モジュール/オプションの横のチェックボックスをチェックするとそのモジュールを表示し、チェックを外すと表示しません。もう一度表示オプションをクリックすると、表示オプションを閉じます。

Expanding, Collapsing, and Rearranging, Modules

The modules, such as Posts, can be expanded, or collapsed, by clicking on the module title bar.

In addition, those modules can be moved by hovering the mouse cursor over the module title bar, when the mouse cursor changes to 4-arrows, hold the left-mouse button down, drag the module to where you want to place it, then release the mouse button (this is called drag-and-drop).

Create a Menu

To create a new custom menu, click on the + tab, give the menu a name, and click Save Menu button.

Note: If the current theme does not support menus, the message, "The current theme does not natively support menus, but you can use the “Custom Menu” widget to add any menus you create here to the theme’s sidebar." will display informing you that widgets can be used to put custom menus in a sidebar.

You can create multiple menus. If your theme includes support for more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.

Once a menu is created these options are available:

Delete Menu 
Click this link to delete the menu. Deleting also deletes the menu items.
Automatically add new top-level pages 
Check this box so that anytime a new top-level Page is created, that Page will automatically be added to the menu
Save menu 
Click this button to save the menu.

Add Menu Items

After a menu is created, then detail items can be added to the menu. Choose items like custom links, pages, and categories, from the left column to add to the menu. If you have created custom post types or custom taxonomies those too can be added to menus. If you don't see your custom post types or taxonomies, look under the Screen Options to make sure they are checked to be Show on Screen.

After adding you have added items, drag and drop to put them in the order you want. You can also click each item to reveal additional configuration options. You can also drag a menu item a little to the right to make it a submenu, to create menus with hierarchy. You'll see when the position of the drop target shifts over to portray the nested placement. When you have finished building your custom menu, make sure you click the Save Menu button.

You can specify a different navigation label for a menu item as well as other attributes. You can create multiple menus. If your theme includes more than one menu, you can choose which custom menu to associate with each. You can also use custom menus in conjunction with the Custom Menus widget.

This screenshot shows an example of the About Menu Item displayed in a hierarchy under the Home Menu Item.


Theme Locations

Theme locations allow the definition of the placement of your menu. The WordPress Twenty Seventeen テーマ only support one menu location so the message 'Your theme supports 1 menu. Select which menu you would like to use. displays.

Location 
From the pull down box, select the menu that will be presented in the location such as Primary Location
Save 
Click to save the location selection.

Custom Links

Custom links allow links defined by you that don't fit into the other types of menu items.

URL
Enter the URL of the custom link.
Label
Enter the label describing the custom link URL.
Add to Menu
Click this button to add this as a Custom item to the menu.

Once added to the menu, the item will display to the right with the label, the word Custom and a configuration arrow that can be used to change the URL or Label as well as Remove the custom link from the menu.

Posts

Links to specific posts can be added to the menu. Three tabs, Most Recent, View All, and Search, determines what posts are displayed for selection as a menu item.

Checkbox
Check the box next to the item to add to the menu.
Select All
Cause the Checkbox to be checked on all items.
Add to Menu
Click this button to add the selected items to the menu.

Pages

Links to specific pages can be added to the menu. Three tabs, Most Recent, View All, and Search, determines what posts are displayed for selection as a menu item. When the View All tab is displayed, a Home choice, while not an actual page, also becomes available to add to the menu. The Checkbox, Select All, and Add to Menu options, describe in the Posts section, are also displayed in this module.

Categories

Categories can also be added to the menu. Three tabs, Most Recent, View All, and Search, determines what categories are displayed for selection as a menu item. The list of categories to select from do not display with any hierarchy, though that may be subject to change in future versions of WordPress. The Checkbox, Select All, and Add to Menu options, describe in the Posts section, are also displayed in this module.

Post Tags

Post Tags can also be added to menus. Three tabs, Most Recent, View All, and Search, determines what categories are displayed for selection as a menu item. The Checkbox, Select All, and Add to Menu options, describe in the Posts section, are also displayed in this module.

Custom Post Types and Taxonomies

If you have added custom post types and taxonomies, those types will also be available to add as menu items. If you don't see your custom post types or taxonomies, check the Screen Options to insure those modules are set to display. The options under each of the custom post type and taxonomy modules correspond to those used for Posts, Pages, Categories, and Post Tags.

Rearranging, Configuring, and Deleting Menu Items

Once an item is added to a menu, those menu items can be rearranged. Placing the mouse cursor over the menu item title, when the mouse cursor changes to 4-arrows, hold the left-mouse button down, drag the module to where you want to place it, then release the mouse button (this is called drag-and-drop). Remember you can drag a menu item slightly to the right of the menu item above it to create a hierarchy (parent/child) relationship in the menu.

Each Menu Item has a configuration arrow on the right side of the Menu Item title, that when clicked opens the configuration box. Click the arrow a second time closed the configuration box. If you don't see Link Target, CSS Classes, Link Relationship (XFN), and Description, then under Screen Options make sure those boxes are checked to expose them here.

Then configuration choices are:

Navigation Label 
The label for this particular menu item
Title Attribute 
The attribute used when displaying the label
Link Target 
Select "Same window or tab" or "New window or tab" from the pulldown.
CSS Classes 
Optional CSS Classes for this menu item
Link Relationship (XFN) 
Allows for the generation of XFN attributes automatically so you can show how you are related to the authors/owners of site to which you are linking. See Link Relationship for details.
Description 
Description for this link. The description will be displayed in the menu if the current theme supports it.
Original 
A link to the original source of the menu item (e.g. a link to view the post or page).
Remove 
Remove this menu item from the menu.
Cancel 
Cancel the configuration of the menu item and

Adding Menu Support to Themes

The WordPress Twenty Seventeen テーマ support navigation Menus. If your theme does not support the custom menu feature you can do it yourself by adding the appropriate code to your theme's function.php file. To implement Menus for a theme see:

Changelog

  • 3.0 : New SubPanel


管理パネル に戻る。


最新英語版: WordPress Codex » Appearance Menus SubPanel最新版との差分