post_type-imovel
Tipo de post customizado para cadastro de imóveis
// Register Custom Post Type function cadastro_imovel() { $labels = array( 'name' => _x( 'Imóveis', 'Post Type General Name', 'imovel' ), 'singular_name' => _x( 'Cadastrar imóvel', 'Post Type Singular Name', 'imovel' ), 'menu_name' => __( 'Imóveis', 'imovel' ), 'parent_item_colon' => __( 'Item referência:', 'imovel' ), 'all_items' => __( 'Todos', 'imovel' ), 'view_item' => __( 'Vizualizar', 'imovel' ), 'add_new_item' => __( 'Cadastrar novo imóvel', 'imovel' ), 'add_new' => __( 'Adicionar novo', 'imovel' ), 'edit_item' => __( 'Editar', 'imovel' ), 'update_item' => __( 'Atualizar', 'imovel' ), 'search_items' => __( 'Buscar', 'imovel' ), 'not_found' => __( 'Não encontrado', 'imovel' ), 'not_found_in_trash' => __( 'Nada encontrado na lixeira', 'imovel' ), ); $rewrite = array( 'slug' => 'imovel', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'imovel', 'imovel' ), 'description' => __( 'Cadastro de imóvel', 'imovel' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 10, 'menu_icon' => '#', 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post', ); register_post_type( 'imovel', $args ); } // Hook into the 'init' action add_action( 'init', 'cadastro_imovel', 0 );