Tagged: custom post type, menu_icon, piklist
- This topic has 3 replies, 2 voices, and was last updated 6 years ago by
Steve.
-
AuthorPosts
-
-
January 13, 2016 at 11:02 pm #5588
sajonaraMemberWhen I create a new custom post type I use a
$labelsarray to summarize all that can be put in the'labels'post type array, like so:$post_types['ng_game'] = array( 'labels' => $labels, 'title' => __('Spiele'), 'public' => true, 'publicly_queryable' => true, 'menu_position' => 5, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'query_var' => true, 'capability_type' => 'page', ... );But if add the
menu_iconto the$labelsarray it is not interpreted, I have to add it somewhere between the above shown code.This is just a remark as I found it a bit odd that
menu_namecould be added to the$labelsarray butmenu_iconcannot.Kind regards
-
January 13, 2016 at 11:22 pm #5591
SteveKeymaster@sajonara– These parameters you are mentioning are standard WordPress functions. Labels are words that appear in the admin. The menu_icon is the url to the icon to be used for this menu. It doesn’t make sense for menu_icon to be in the labels array.
To see everything that you can include, please refer to the WordPress codex for the register_post_type function.
-
January 14, 2016 at 4:06 am #5592
sajonaraMember@Steve Thx for the clarification. When working with Piklist one can easily forget which part is generic and which genuine but then you Piklist guys cannot change WordPress’ mistakes.
Because I strongly believe that in this case WordPress’ nomenclature makes no sense. I first thought both terms belong together, because of their prefix, but obviously they are for different parts of the workflow.
-
January 14, 2016 at 10:32 am #5596
-
-
AuthorPosts
- The topic ‘menu_icon not interpreted as label’ is closed to new replies.