Created
February 6, 2016 07:38
-
-
Save anonymous/6150e80ba8e7efb625a7 to your computer and use it in GitHub Desktop.
YARPPとCustom Post Type UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', 'cptui_register_my_cpts' ); | |
function cptui_register_my_cpts() { | |
$labels = array( | |
"name" => "ブログ", | |
"singular_name" => "", | |
"menu_name" => "Livalest's Log", | |
"all_items" => "すべてのLivalest's Log", | |
"add_new" => "新規追加", | |
"add_new_item" => "Livalest's Logの新規追加", | |
"edit" => "編集", | |
"edit_item" => "Livalest's Logの編集", | |
"new_item" => "新しいLivalest's Log", | |
"view" => "表示", | |
"view_item" => "Livalest's Logを表示", | |
"search_items" => "Livalest's Logを検索", | |
"not_found" => "見つかりません", | |
"not_found_in_trash" => "ゴミ箱にはありません", | |
"parent" => "親", | |
); | |
$args = array( | |
“labels” => $labels, | |
“description” => “”, | |
“public” => true, | |
“show_ui” => true, | |
“has_archive” => true, | |
“show_in_menu” => true, | |
“exclude_from_search” => false, | |
“capability_type” => “post”, | |
“map_meta_cap” => true, | |
“hierarchical” => false, | |
“rewrite” => array( “slug” => “blog”, “with_front” => true ), | |
“query_var” => true, | |
“menu_position” => 5, | |
“supports” => array( “title”, “editor”, “excerpt”, “custom-fields”, “comments”, “thumbnail” ), | |
“taxonomies” => array( “category”, “post_tag” ) | |
); | |
register_post_type( “blog”, $args ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment