內容簡介
如果您需要為人類實現自訂文章類型,並且在標題欄位中需要輸入姓名而非標題,這個外掛將會為您提供適當的使用者介面。請參閱屏幕截圖以查看範例。
使用方式
當您建立自定文章類型時,只需確保您將 name 視作該文章類型的功能之一即可(截至版本 0.1,相當反直覺的是,title 功能也是必需的,如下面的範例所示)。
register_post_type( 'people', array( 'label' => 'People', 'supports' => array( 'title', 'name', ... ) ... ) );
Name Support 還為您提供模板標籤 the_name() 和 get_the_name(),分別以 "[名字] [姓氏]" 的格式列印或返回姓名。
本外掛的開發得到了麻省理工學院藝術中心 (Arts at MIT) 的支持。
外掛標籤
開發者團隊
原文外掛簡介
If you need to implement a custom post type for human beings, where in lieu of a title you need a name, this plugin will add the proper UI. See screenshots for an example.
Usage
When creating your custom post type, just make sure you specify name as one of the post type’s features. (As of version 0.1, the title feature, quite counterintuitively, is also required as in the example below.)
register_post_type( 'people', array( 'label' => 'People', 'supports' => array( 'title', 'name', ... ) ... ) );
Name Support also gives you the template tags the_name() and get_the_name() which prints or returns the name in “[First Name] [Last Name]” format.
Development of this plugin was supported by the Arts at MIT.
