if ( ! function_exists('produkter_post_type') ) { // Register Custom Post Type function produkter_post_type() { $labels = array( 'name' => _x( 'Produkterne', 'Post Type General Name', 'produkt_domain' ), 'singular_name' => _x( 'Produkt', 'Post Type Singular Name', 'produkt_domain' ), 'menu_name' => __( 'Produkterne', 'produkt_domain' ), 'name_admin_bar' => __( 'Produkterne', 'produkt_domain' ), 'archives' => __( 'Produktgrupper', 'produkt_domain' ), 'attributes' => __( 'Produkter i gruppen', 'produkt_domain' ), 'parent_item_colon' => __( 'Produktets forældre', 'produkt_domain' ), 'all_items' => __( 'Alle produkterne', 'produkt_domain' ), 'add_new_item' => __( 'Tilføj nyt', 'produkt_domain' ), 'add_new' => __( 'Tilføj nyt', 'produkt_domain' ), 'new_item' => __( 'Nyt produkt', 'produkt_domain' ), 'edit_item' => __( 'Ændre prodult', 'produkt_domain' ), 'update_item' => __( 'Update produkt', 'produkt_domain' ), 'view_item' => __( 'Se produktet', 'produkt_domain' ), 'view_items' => __( 'Se produkterne', 'produkt_domain' ), 'search_items' => __( 'Søg produkt', 'produkt_domain' ), 'not_found' => __( 'Ikke fundet', 'produkt_domain' ), 'not_found_in_trash' => __( 'Ikke fundet i slettet', 'produkt_domain' ), 'featured_image' => __( 'Se produktbillede', 'produkt_domain' ), 'set_featured_image' => __( 'Sæt produktbillede', 'produkt_domain' ), 'remove_featured_image' => __( 'Fjern produkbillede', 'produkt_domain' ), 'use_featured_image' => __( 'Brug som produktbillede', 'produkt_domain' ), 'insert_into_item' => __( 'Indsæt ind i produktet', 'produkt_domain' ), 'uploaded_to_this_item' => __( 'Uploaded til produktet', 'produkt_domain' ), 'items_list' => __( 'Produkt liste', 'produkt_domain' ), 'items_list_navigation' => __( 'Produkt liste navigation', 'produkt_domain' ), 'filter_items_list' => __( 'Filter listen af produkter', 'produkt_domain' ), ); $args = array( 'label' => __( 'Produkt', 'produkt_domain' ), 'description' => __( 'UNIK's produkter', 'produkt_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'trackbacks', 'page-attributes', 'post-formats' ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 20, 'menu_icon' => 'dashicons-cart', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'produkt_type', $args ); } add_action( 'init', 'produkter_post_type', 0 ); }