Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Profili

Custom post type za profile

if ( ! function_exists('profil_post_type') ) {

// Register Custom Post Type
function profil_post_type() {

	$labels = array(
		'name'                  => 'Profili',
		'singular_name'         => 'Profil',
		'menu_name'             => 'Profili',
		'name_admin_bar'        => 'Profili',
		'archives'              => 'Profil arhiva',
		'attributes'            => 'Atributi profila',
		'parent_item_colon'     => 'Parent Item:',
		'all_items'             => 'Svi profili',
		'add_new_item'          => 'Dodaj novi profil',
		'add_new'               => 'Dodaj novi',
		'new_item'              => 'Novi profil',
		'edit_item'             => 'Edituj profil',
		'update_item'           => 'Ažuriraj profil',
		'view_item'             => 'Vidi profil',
		'view_items'            => 'Vidi profile',
		'search_items'          => 'Traži profil',
		'not_found'             => 'Nije nađen',
		'not_found_in_trash'    => 'Nije nađen u đubretu',
		'featured_image'        => 'Naslovna slika',
		'set_featured_image'    => 'Postavi naslovnu sliku',
		'remove_featured_image' => 'Ukloni naslovnu sliku',
		'use_featured_image'    => 'Koristi kao naslovnu sliku',
		'insert_into_item'      => 'Ubaci u profil',
		'uploaded_to_this_item' => 'Uploaduj u ovaj profil',
		'items_list'            => 'Lista profila',
		'items_list_navigation' => 'Navigacija kroz listu profila',
		'filter_items_list'     => 'Filter liste profila',
	);
	$args = array(
		'label'                 => 'Profil',
		'description'           => 'Tip posta za smeštanje profila za oglase',
		'labels'                => $labels,
		'supports'              => array( 'title', 'custom-fields' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-users',
		'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'       => 'post',
		'show_in_rest'          => true,
	);
	register_post_type( 'profile_type', $args );

}
add_action( 'init', 'profil_post_type', 0 );

}