Skip to content

Instantly share code, notes, and snippets.

@NatalieMac
Last active August 29, 2015 13:57
Show Gist options
  • Save NatalieMac/9438049 to your computer and use it in GitHub Desktop.
Save NatalieMac/9438049 to your computer and use it in GitHub Desktop.
<?php
function alphaindex_register_song() {
register_post_type('song', array(
'label' => 'Songs',
'menu_icon' => 'dashicons-format-audio',
'description' => '',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'lyrics', 'with_front' => true),
'query_var' => true,
'has_archive' => true,
'supports' => array('title','editor','revisions'),
'labels' => array (
'name' => 'Songs',
'singular_name' => 'Song',
'menu_name' => 'Songs',
'add_new' => 'Add Song',
'add_new_item' => 'Add New Song',
'edit' => 'Edit',
'edit_item' => 'Edit Song',
'new_item' => 'New Song',
'view' => 'View',
'view_item' => 'View Song',
'search_items' => 'Search Songs',
'not_found' => 'No Songs Found',
'not_found_in_trash' => 'No Songs Found in Trash',
'parent' => 'Parent Song'
)
) );
}
add_action('init', 'alphaindex_register_song');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment