ملک و املاک
// Register Custom Post Type
function estate_post_type() {
$labels = array(
'name' => _x( 'املاک', 'Post Type General Name', 'estate' ),
'singular_name' => _x( 'ملک', 'Post Type Singular Name', 'estate' ),
'menu_name' => __( 'املاک', 'estate' ),
'parent_item_colon' => __( 'ملک مادر', 'estate' ),
'all_items' => __( 'همه املاک', 'estate' ),
'view_item' => __( 'مشاهده ملک', 'estate' ),
'add_new_item' => __( 'افزودن ملک', 'estate' ),
'add_new' => __( 'افزودن ملک', 'estate' ),
'edit_item' => __( 'ویرایش ملک', 'estate' ),
'update_item' => __( 'بروزرسانی ملک', 'estate' ),
'search_items' => __( 'جستجوی مبلک', 'estate' ),
'not_found' => __( 'یافت نشد', 'estate' ),
'not_found_in_trash' => __( 'در زباله دان یافت نشد', 'estate' ),
);
$rewrite = array(
'slug' => 'estate',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'estate', 'estate' ),
'description' => __( 'اطلاعات املاک', 'estate' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => '',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'estate', $args );
}
// Hook into the 'init' action
add_action( 'init', 'estate_post_type', 0 );