Subtitle
v0.1ShinichiN · 2013年5月1日 上架
Displays subtitle text field after the title in post, page and other post type edit page.
- 正在使用
- 100+
- 评分
- 3.0 / 5
- 累计下载
- 4,844
- 最近更新
- 2013年5月1日
2 条评价需要 WordPress 3.5.1+已测试到 3.5.2
贡献者
截图
Displays subtitle text field after the title in post, page and other post type edit page.
Retriving and displaying in templates
Use get_nskw_subtitle() to retrieve and nskw_subtitle() to display.
Change label
By default the label of the input field is "Subtitle". There's a hook for changing it.
add_filter( 'nskw-fat-meta_label', 'nskw_changeLabel' );
function nskw_changeLabel() {
return 'new label';
}
Hide in specific post types
By default, subtitle field appears in every post type edit pages except for attachment.
To hide in particular post type pages, there’s a hook.
// hide subtitle field in posttype 'attachment', 'page'、''newposttype'
add_filter( 'nskw-fat_post_type', 'nskw_hide_subtitle' );
function nskw_hide_subtitle() {
return array( 'attachment', 'page', 'newposttype' );
}
