Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Create photo album
- add_action( 'init', 'create_taxonomies' );
- function create_taxonomies() {
- $cat_labels = array(
- 'name' => __( 'Albums', 'fotos' ),
- 'singular_name' => __( 'Album', 'fotos' ),
- 'search_items' => __( 'Search Albums', 'fotos' ),
- 'all_items' => __( 'All Albums', 'fotos' ),
- 'parent_item' => __( 'Parent Album', 'fotos' ),
- 'parent_item_colon' => __( 'Parent Album:', 'fotos' ),
- 'edit_item' => __( 'Edit Album', 'fotos' ),
- 'update_item' => __( 'Update Album', 'fotos' ),
- 'add_new_item' => __( 'Add New Album', 'fotos' ),
- 'new_item_name' => __( 'New Album Name', 'fotos' ),
- 'choose_from_most_used' => __( 'Choose from the most used photos albums', 'fotos' )
- );
- register_taxonomy('album_cats','photos',array(
- 'hierarchical' => true,
- 'labels' => $cat_labels,
- 'query_var' => true,
- 'rewrite' => array( 'slug' => 'album' ),
- ));
- }
Add Comment
Please, Sign In to add comment