array( 'name' => 'My Stories', 'singular_name' => 'My Story', 'add_new' => 'Add New', 'add_new_item' => 'Add New My Story', 'edit' => 'Edit', 'edit_item' => 'Edit My Story', 'new_item' => 'New My Story', 'view' => 'View', 'view_item' => 'View My Story', 'search_items' => 'Search My Stories', 'not_found' => 'No My Stories found', 'not_found_in_trash' => 'No My Stories found in Trash', 'parent' => 'Parent My Story' ), 'public' => true, 'menu_position' => 15, 'supports' => array('title', 'editor'), /* 'supports' => array('title', 'editor', 'comments', 'thumbnail', 'custom-fields'), */ 'taxonomies' => array(''), 'menu_icon' => 'dashicons-smiley', 'has_archive' => true ) ); } add_action('init', 'create_my_story'); function my_admin() { add_meta_box('my_story_meta_box', 'My Story Details', 'display_my_story_meta_box', 'my_stories', 'normal', 'high' ); } add_action('admin_init', 'my_admin'); function display_my_story_meta_box($my_story) { $story_memo = esc_html(get_post_meta($my_story->ID, 'story_memo', true)); $story_rating = intval(get_post_meta($my_story->ID, 'story_rating', true)); ?>
Story Memo | |
Story Rating |