wp_get_nav_menu_itemsの戻り値
このサイトの、「ヘッダーメニュー」というか、「ヘッダーナビ」というか、「グローバルナビ」というか(どれも同じモノ??)、
それの詳細を表示させてます。
以下は、メニュー名を「ヘッダーメニュー」にして、「wp_get_nav_menu_items()」を呼び出したときの戻り値です。
リストを出して見た感じでは、
「$item->db_id」と「$item->ID」は、メニュー構造の(?)IDで、その親を示すのが「$item->item_paremt」。
「$item->object_id」は、該当する投稿や固定ファイルのIDで、その親を示すのが「$item->post_parent」
になってるみたいな気がします。(あえて曖昧な表現)
wp_get_nav_menu_items
「ヘッダーメニュー」の内容を取得
| title | ID db_id |
item _親 |
object _id |
post _親 |
|||
| 1 | TOP PAGE | 固定 | 100153 100153 |
0 | 100117 | 0 | |
| 2 | 固定page-TOP | 固定 | 100154 100154 |
0 | 100119 | 0 | |
| 3 | (index)WordP | 固定 | 100342 100342 |
100154 | 100325 | 0 | |
| 4 | (index)phpなど | 固定 | 100163 100163 |
100342 | 100131 | 100325 | |
| 5 | (index)WordP | 固定 | 100162 100162 |
100342 | 100123 | 100325 | |
| 6 | ブログ-TOP | 固定 | 100156 100156 |
0 | 100127 | 0 | |
| 7 | WPはじめました(´ω` | カテ | 100164 100164 |
100156 | 2 | 0 | |
| 8 | WP親子関係(階層構造) | カテ | 100166 100166 |
100156 | 6 | 0 | |
| 9 | つれづれに(雑談) | カテ | 100343 100343 |
100156 | 8 | 0 | |
| 10 | メール・お問い合わせ | 固定 | 100157 100157 |
0 | 100129 | 100117 | |
| 11 | サイトマップ(WP標準) | 固定 | 100268 100268 |
0 | 100264 | 100117 | |
| 12 | 親サイトへ | カス | 100210 100210 |
0 | 100210 | 0 | |
| 13 | 親サイト:みらくるダンス | カス | 100211 100211 |
100210 | 100211 | 0 | |
| 14 | 趣味のオーディオ実験室 | カス | 100213 100213 |
100210 | 100213 | 0 | |
| 15 | ■管理ページ | カス | 100170 100170 |
0 | 100170 | 0 |
wp_get_nav_menu_items() の詳細
| 1〔固定ページ〕TOP PAGE | |
| ID | 100153 |
| post_author | 1 |
| post_date | 2022-03-02 09:26:46 |
| post_date_gmt | 2022-03-02 00:26:46 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100153 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-02 09:26:46 |
| post_modified_gmt | 2022-03-02 00:26:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100153.html |
| menu_order | 1 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100153 |
| menu_item_parent | 0 |
| object_id | 100117 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/ |
| title | TOP PAGE |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 2〔固定ページ〕固定page-TOP | |
| ID | 100154 |
| post_author | 1 |
| post_date | 2022-03-09 17:56:11 |
| post_date_gmt | 2022-03-02 00:26:46 |
| post_content | |
| post_title | 固定page-TOP |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100154 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:56:11 |
| post_modified_gmt | 2022-03-09 08:56:11 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100154.html |
| menu_order | 2 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100154 |
| menu_item_parent | 0 |
| object_id | 100119 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/index.html |
| title | 固定page-TOP |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 3〔固定ページ〕(index)WordPress,PHP,CSSなど | |
| ID | 100342 |
| post_author | 1 |
| post_date | 2022-03-09 17:56:00 |
| post_date_gmt | 2022-03-09 08:40:46 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100342 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:56:00 |
| post_modified_gmt | 2022-03-09 08:56:00 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100342.html |
| menu_order | 3 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100342 |
| menu_item_parent | 100154 |
| object_id | 100325 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/index07programing.html |
| title | (index)WordPress,PHP,CSSなど |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 4〔固定ページ〕(index)phpなどの動作確認のページ | |
| ID | 100163 |
| post_author | 1 |
| post_date | 2022-03-09 20:25:12 |
| post_date_gmt | 2022-03-02 00:29:47 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100163 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 20:25:12 |
| post_modified_gmt | 2022-03-09 11:25:12 |
| post_content_filtered | |
| post_parent | 100325 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100163.html |
| menu_order | 4 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100163 |
| menu_item_parent | 100342 |
| object_id | 100131 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/index07programing/index999test.html |
| title | (index)phpなどの動作確認のページ |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 5〔固定ページ〕(index)WordPress関連の固定ページ | |
| ID | 100162 |
| post_author | 1 |
| post_date | 2022-03-09 20:25:12 |
| post_date_gmt | 2022-03-02 00:29:47 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100162 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 20:25:12 |
| post_modified_gmt | 2022-03-09 11:25:12 |
| post_content_filtered | |
| post_parent | 100325 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100162.html |
| menu_order | 5 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100162 |
| menu_item_parent | 100342 |
| object_id | 100123 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/index07programing/index333wordpress.html |
| title | (index)WordPress関連の固定ページ |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 6〔固定ページ〕ブログ-TOP | |
| ID | 100156 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 00:26:46 |
| post_content | |
| post_title | ブログ-TOP |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100156 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100156.html |
| menu_order | 6 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100156 |
| menu_item_parent | 0 |
| object_id | 100127 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/wpblog.html |
| title | ブログ-TOP |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 7〔カテゴリー〕WPはじめました(´ω`) | |
| ID | 100164 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 00:29:47 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100164 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100164.html |
| menu_order | 7 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100164 |
| menu_item_parent | 100156 |
| object_id | 2 |
| object | category |
| type | taxonomy |
| type_label | カテゴリー |
| url | https://mudabukuro.miracle-dance.com/wpblog/category/wp-hajimeru |
| title | WPはじめました(´ω`) |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 8〔カテゴリー〕WP親子関係(階層構造)(・ω・) | |
| ID | 100166 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 00:36:11 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100166 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100166.html |
| menu_order | 8 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100166 |
| menu_item_parent | 100156 |
| object_id | 6 |
| object | category |
| type | taxonomy |
| type_label | カテゴリー |
| url | https://mudabukuro.miracle-dance.com/wpblog/category/wp-oyako |
| title | WP親子関係(階層構造)(・ω・) |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 9〔カテゴリー〕つれづれに(雑談) | |
| ID | 100343 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-09 08:40:46 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100343 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100343.html |
| menu_order | 9 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100343 |
| menu_item_parent | 100156 |
| object_id | 8 |
| object | category |
| type | taxonomy |
| type_label | カテゴリー |
| url | https://mudabukuro.miracle-dance.com/wpblog/category/zatsudan |
| title | つれづれに(雑談) |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 10〔固定ページ〕メール・お問い合わせ | |
| ID | 100157 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 00:26:46 |
| post_content | |
| post_title | |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | 100157 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 100117 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100157.html |
| menu_order | 10 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100157 |
| menu_item_parent | 0 |
| object_id | 100129 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/infomation/mailbox.html |
| title | メール・お問い合わせ |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 11〔固定ページ〕サイトマップ(WP標準) | |
| ID | 100268 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-05 05:45:26 |
| post_content | |
| post_title | サイトマップ(WP標準) |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | nav_menu_item-0-4 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 100117 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100268.html |
| menu_order | 11 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100268 |
| menu_item_parent | 0 |
| object_id | 100264 |
| object | page |
| type | post_type |
| type_label | 固定ページ |
| url | https://mudabukuro.miracle-dance.com/infomation/sitemap.html |
| title | サイトマップ(WP標準) |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 12〔カスタムリンク〕親サイトへ | |
| ID | 100210 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 20:21:02 |
| post_content | |
| post_title | 親サイトへ |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | nav_menu_item-0-5 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100210.html |
| menu_order | 12 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100210 |
| menu_item_parent | 0 |
| object_id | 100210 |
| object | custom |
| type | custom |
| type_label | カスタムリンク |
| title | 親サイトへ |
| url | https://miracle-dance.com |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 13〔カスタムリンク〕親サイト:みらくるダンス.com | |
| ID | 100211 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 20:21:02 |
| post_content | |
| post_title | 親サイト:みらくるダンス.com |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | nav_menu_item-0 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100211.html |
| menu_order | 13 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100211 |
| menu_item_parent | 100210 |
| object_id | 100211 |
| object | custom |
| type | custom |
| type_label | カスタムリンク |
| title | 親サイト:みらくるダンス.com |
| url | https://miracle-dance.com |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 14〔カスタムリンク〕趣味のオーディオ実験室 | |
| ID | 100213 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 20:24:35 |
| post_content | |
| post_title | 趣味のオーディオ実験室 |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | nav_menu_item-0-3 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100213.html |
| menu_order | 14 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100213 |
| menu_item_parent | 100210 |
| object_id | 100213 |
| object | custom |
| type | custom |
| type_label | カスタムリンク |
| title | 趣味のオーディオ実験室 |
| url | https://audio.miracle-dance.com |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |
| 15〔カスタムリンク〕■管理ページ | |
| ID | 100170 |
| post_author | 1 |
| post_date | 2022-03-09 17:40:46 |
| post_date_gmt | 2022-03-02 02:37:20 |
| post_content | |
| post_title | ■管理ページ |
| post_excerpt | |
| post_status | publish |
| comment_status | closed |
| ping_status | closed |
| post_password | |
| post_name | nav_menu_item-0-2 |
| to_ping | |
| pinged | |
| post_modified | 2022-03-09 17:40:46 |
| post_modified_gmt | 2022-03-09 08:40:46 |
| post_content_filtered | |
| post_parent | 0 |
| guid | https://mudabukuro.miracle-dance.com/wpblog/post-100170.html |
| menu_order | 15 |
| post_type | nav_menu_item |
| post_mime_type | |
| comment_count | 0 |
| filter | raw |
| db_id | 100170 |
| menu_item_parent | 0 |
| object_id | 100170 |
| object | custom |
| type | custom |
| type_label | カスタムリンク |
| title | ■管理ページ |
| url | https://mudabukuro.miracle-dance.com/wp-admin |
| target | |
| attr_title | |
| description | |
| classes | 配列() |
| xfn | |