register_nav_menus

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 17:03:14 | 最終更新:2011-03-20 (日) 17:26:24

テーマにカスタムメニューを追加する。

テーマの functions.php に記述。
そうすると、管理画面の [外観] に [メニュー] が出現。

WordPress Codex:register_nav_menus

利用例
  1. if ( function_exists( 'register_nav_menus' ) ) {
  2.     register_nav_menus(
  3.         array(
  4.           'pluginbuddy_mobile' => 'PluginBuddy Mobile Navigation Menu',
  5.           'foot_menu' => 'My Custom Footer Menu'
  6.         )
  7.     );
  8. }

 
配列内のキーは、wp_nav_menu() を記述する際の theme_location に。
例)’theme_location’ => ‘pluginbuddy_mobile’

配列内の値は、管理画面の
[外観]-[メニュー]-[テーマの場所] に表示される文言となる。

備考

◆register_nav_menus を functions.php に記述すれば

  1. add_theme_support( 'menus' );

は記述する必要なし。

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 17:03:14 | 最終更新:2011-03-20 (日) 17:26:24

オプション リファレンス -> ? (?)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 5:06:16 | 最終更新:2011-03-20 (日) 5:06:16

active_plugins

Default: array()
Data type:
 

advanced_edit

Default: 0
Data type: Integer
 

recently_edited

Default: NULL
Data type:
 

image_default_link_type

Default: ‘file’
Data type:
 

image_default_size

Default: NULL
Data type:
 

image_default_align

Default: NULL
Data type:
 

sticky_posts

Default: array()
Data type:
 

widget_categories

Default: array()
Data type:
 

widget_text

Default: array()
Data type:
 

widget_rss

Default: array()
Data type:

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 5:06:16 | 最終更新:2011-03-20 (日) 5:06:16

オプション リファレンス -> 投稿設定 (Writing)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 5:03:52 | 最終更新:2011-03-20 (日) 5:03:52

default_category

ID of the category that posts will be put in by default
Default: 1
Data type: Integer
 

default_email_category

ID of the category that posts will be put in by default when written via e-mail
Default: 1
Data type: Integer
 

default_link_category

ID of the category that links will be put in by default
Default: 2
Data type: Integer
 

default_post_edit_rows

Size of the post box (in lines)
Default: 10
Data type: Integer
 

mailserver_login

Mail server username for posting to WordPress by e-mail
Default: ‘login@example.com’
Data type: String
 

mailserver_pass

Mail server password for posting to WordPress by e-mail
Default: ‘password’
Data type: String
 

mailserver_port

Mail server port for posting to WordPress by e-mail
Default: 110
Data type: Integer
 

mailserver_url

Mail server for posting to WordPress by e-mail
Default: ‘mail.example.com’
Data type: String
 

ping_sites

When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see Update Services. Separate multiple service URLs with line breaks. Requires blog_public to have a value of 1.
Default: ‘http://rpc.pingomatic.com/’
Data type: String (possibly multi-line)
 

use_balanceTags

Correct invalidly-nested XHTML automatically
1 : Yes
0 : No (default)
Data type: Integer
 

use_smilies

Convert emoticons like 🙂 and 😛 to graphics when displayed
1 : Yes (default)
0 : No
Data type: Integer
 

use_trackback

Enable sending and receiving of trackbacks
1 : Yes
0 : No (default)
 

enable_app

Enable the Atom Publishing Protocol
1 : Yes
0 : No (default)
Data type: Integer
 

enable_xmlrpc

Enable the WordPress, Movable Type, MetaWeblog and Blogger XML-RPC publishing protocols
1 : Yes
0 : No (default)
Data type: Integer

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 5:03:52 | 最終更新:2011-03-20 (日) 5:03:52

オプション リファレンス -> テーマ? (Themes)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 5:00:34 | 最終更新:2011-03-20 (日) 5:00:34

template

The slug of the currently activated theme (how it is accessed by path, ex. /wp-content/themes/some-theme: some-theme would be the value)
Default: ‘default’
Data type: String
 

stylesheet

The slug of the currently activated stylesheet (style.css) (how it is accessed by path, ex. /wp-content/themes/some-theme: some-theme would be the value)
Default: ‘default’
Data type: String

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 5:00:34 | 最終更新:2011-03-20 (日) 5:00:34

オプション リファレンス -> 表示設定 (Reading)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:58:51 | 最終更新:2011-03-20 (日) 4:58:51

blog_charset

Encoding for pages and feeds. The character encoding you write your blog in (UTF-8 is recommended).
Default: ‘UTF-8’
Data type: String
 

gzipcompression

WordPress should compress articles (with gzip) if browsers ask for them.
1 : Yes
0 : No (default)
Data type: Integer
 

page_on_front

The ID of the page that should be displayed on the front page. Requires show_on_front’s value to be page.
Data type: Integer
 

page_for_posts

The ID of the page that displays posts. Useful when show_on_front’s value is page.
Data type: Integer
 

posts_per_page

Show at most x many posts on blog pages.
Default: 10
Data type: Integer
 

posts_per_rss

Show at most x many posts in RSS feeds.
Default: 10
Data type: Integer
 

rss_language

Language for RSS feeds (metadata purposes only)
Default: ‘en’
Data type: String (ISO two-letter language code)
 

rss_use_excerpt

Show an excerpt instead of the full text of a post in RSS feeds
1 : Yes
0 : No (default)
Data type: Integer
 

show_on_front

What to show on the front page
posts : Your latest posts (default)
page : A static page (see page_on_front)
Data type: String

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:58:51 | 最終更新:2011-03-20 (日) 4:58:51

オプション リファレンス -> プライバシー (Privacy)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:56:30 | 最終更新:2011-03-20 (日) 4:56:30

blog_public

1 : I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers. (default)
0 : I would like to block search engines, but allow normal visitors.
Data type: Integer

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:56:30 | 最終更新:2011-03-20 (日) 4:56:30

オプション リファレンス -> パーマリンク設定 (Permalinks)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:55:23 | 最終更新:2011-03-20 (日) 4:55:23

permalink_structure

The desired structure of your blog’s permalinks. Some examples:
/%year%/%monthnum%/%day%/%postname%/ : Date and name based
/archives/%post_id%/ : Numeric
/%postname%/ : Post name-based
You can see more examples by viewing Using Permalinks.
Default: NULL
Data type: String
 

category_base

The default category base of your blog categories permalink.
Default: NULL
Data type: String
 

tag_base

The default tag base for your blog tags permalink.
Default: NULL
Data type: String

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:55:23 | 最終更新:2011-03-20 (日) 4:55:23

オプション リファレンス -> ? (Miscellaneous)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:53:43 | 最終更新:2011-03-20 (日) 4:53:43

hack_file

Use legacy my-hacks.php file support
1 : Yes
0 : No (default)
Data type: Integer
 

html_type

Default MIME type for blog pages (text/html, text/xml+html, etc.)
Default: ‘text/html’
Data type: String (MIME type)
 

secret

Secret value created during installation used with salting, etc.
Default: wp_generate_password(64)
Data type: String (MD5)
 

upload_path

Store uploads in this folder (relative to the WordPress root)
Default: NULL
Data type: String (relative path)
 

upload_url_path

URL path to upload folder (will be blank by default – Editable in Settings -> Miscellaneous)
Data type: String (url path)
 

uploads_use_yearmonth_folders

Organize my uploads into month- and year-based folders
1 : Yes (default)
0 : No (default for safe mode)
Data type: Integer
 

use_linksupdate

Track links’ update times
1 : Yes
0 : No (default)
Data type: Integer

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:53:43 | 最終更新:2011-03-20 (日) 4:53:43

オプション リファレンス -> メディア (Media)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:51:37 | 最終更新:2011-03-20 (日) 4:51:37

thumbnail_size_w

Default: 150
Data type: Integer
 

thumbnail_size_h

Default: 150
Data type: Integer
 

thumbnail_crop

Crop thumbnail to exact dimensions (normally thumbnails are proportional)
1 : Yes (default)
0 : No
Data type: Integer
 

medium_size_w

Default: 300
Data type: Integer
 

medium_size_h

Default: 300
Data type: Integer
 

large_size_w

Default: 1024
Data type: Integer
 

large_size_h

Default: 1024
Data type: Integer
 

embed_autourls

Attempt to automatically embed all plain text URLs
Default: 1
Data type: Integer
 

embed_size_w

Default: NULL
Data type: Integer
 

embed_size_h

Default: 600
Data type: Integer

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:51:37 | 最終更新:2011-03-20 (日) 4:51:37

オプション リファレンス -> リンク (Links)

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:48:49 | 最終更新:2011-03-20 (日) 4:48:49

links_updated_date_format

Default: ‘__(‘F j, Y g:i a’)’
Data type: String
 

links_recently_updated_prepend

Default: ”
Data type: String
 

links_recently_updated_append

Default: ”
Data type: String
 

links_recently_updated_time

Default: 120
Data type: Integer

Posted by muchag | WordPress |
初回投稿:2011-03-20 (日) 4:48:49 | 最終更新:2011-03-20 (日) 4:48:49
« 前ページへ次ページへ »