Created
August 8, 2012 23:54
-
-
Save pelagisk/3299810 to your computer and use it in GitHub Desktop.
Exempel custom post types
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 | |
| function create_example_post_type() { | |
| $labels = array( | |
| 'name' => 'Exempel', | |
| 'singular_name' => 'Exempel', | |
| 'add_new_item' => 'Lägg till nytt exempel', | |
| 'edit_item' => 'Redigera exempel', | |
| 'new_item' => 'Nytt exempel', | |
| 'view_item' => 'Visa exempel', | |
| 'search_items' => 'Sök bland exempel', | |
| 'not_found' => 'Inga exempel har lagts till', | |
| 'not_found_in_trash' => 'Inga exempel hittades i papperskorgen' | |
| ); | |
| $args = array( | |
| 'labels' => $labels, | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'supports' => array('title', 'editor', 'comments') | |
| ); | |
| register_post_type( 'exempel', $args ); | |
| } | |
| add_action( 'init', 'create_example_post_type' ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment