Created
November 6, 2017 13:05
-
-
Save nandomoreirame/0e2bec1d467cca1bd1669242ba18db6c to your computer and use it in GitHub Desktop.
Odin custom post type
This file contains hidden or 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 | |
| $services_post_type = new Odin_Post_Type( | |
| 'Service', | |
| 'services' | |
| ); | |
| $services_post_type->set_labels( | |
| array( | |
| 'name' => __( 'Services', 'odin' ), | |
| 'menu_name' => __( 'Services', 'odin' ), | |
| 'singular_name' => __( 'Service', 'odin' ), | |
| 'all_items' => __( 'View all', 'odin' ), | |
| 'add_new' => __( 'Add new', 'odin' ), | |
| 'add_new_item' => __( 'New service', 'odin' ), | |
| 'edit_item' => __( 'Edit service', 'odin' ), | |
| 'view_item' => __( 'View service', 'odin' ), | |
| 'view_items' => __( 'View services', 'odin' ), | |
| 'search_items' => __( 'Search services', 'odin' ), | |
| 'not_found' => __( 'Not found', 'odin' ), | |
| 'not_found_in_trash' => __( 'Not found in trash', 'odin' ), | |
| ) | |
| ); | |
| $services_post_type->set_arguments( | |
| array( | |
| 'supports' => array( 'title', 'editor', 'thumbnail' ), | |
| 'menu_icon' => 'dashicons-megaphone' | |
| ) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment