[wp-trac] [WordPress Trac] #16075: Add Post Type Archives support in Nav Menus

WordPress Trac noreply at wordpress.org
Fri Oct 3 13:18:24 UTC 2014


#16075: Add Post Type Archives support in Nav Menus
-----------------------------------+-----------------------------
 Reporter:  matzipan               |       Owner:
     Type:  enhancement            |      Status:  reviewing
 Priority:  normal                 |   Milestone:  Future Release
Component:  Menus                  |     Version:  3.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch ui-feedback  |     Focuses:
-----------------------------------+-----------------------------

Comment (by engelen):

 Even though they don't have their own object in the database, post type
 and taxonomy archives can be considered as object types in the context of
 navigation menus, in my opinion. Currently, supposing we have a post type
 "product" with taxonomy "product_type", the naming is as follows.

 '''For a menu item linking to a certain post:'''
 {{{
 '_menu_item_type' => 'post_type',
 '_menu_item_object' => 'product',
 '_menu_item_object_id' => [post ID]
 }}}

 '''For a menu item linking to a certain product_type term:'''
 {{{
 '_menu_item_type' => 'taxonomy',
 '_menu_item_object' => 'product_type',
 '_menu_item_object_id' => [term ID]
 }}}

 I would suggest the following naming for archives.

 '''For post type archives:'''
 {{{
 '_menu_item_type' => 'post_type_archive',
 '_menu_item_object' => 'product'
 }}}

 '''For taxonomy archives:'''
 {{{
 '_menu_item_type' => 'taxonomy_archive',
 '_menu_item_object' => 'product_type'
 }}}

 Furthermore, I would find it more logical to have two new accordion menus:
 one for post type archives, and one for taxonomy archives. This maintains
 the concept that every menu item type/object-combination has its own
 accordion.

 I would be happy to implement a new patch for this when a decision is
 made.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/16075#comment:80>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list