Home Blocs
if ( ! function_exists('home_tile') ) {
// Register Custom Post Type
function home_tile() {
$labels = array(
'name' => _x( 'blocs', 'Post Type General Name', 'les-acacias' ),
'singular_name' => _x( 'bloc', 'Post Type Singular Name', 'les-acacias' ),
'menu_name' => __( 'Accueil', 'les-acacias' ),
'name_admin_bar' => __( 'Accueil', 'les-acacias' ),
'parent_item_colon' => __( 'Parent bloc:', 'les-acacias' ),
'all_items' => __( 'All blocs', 'les-acacias' ),
'add_new_item' => __( 'Add New bloc', 'les-acacias' ),
'add_new' => __( 'Add New', 'les-acacias' ),
'new_item' => __( 'New bloc', 'les-acacias' ),
'edit_item' => __( 'Edit bloc', 'les-acacias' ),
'update_item' => __( 'Update bloc', 'les-acacias' ),
'view_item' => __( 'View bloc', 'les-acacias' ),
'search_items' => __( 'Search bloc', 'les-acacias' ),
'not_found' => __( 'Not found', 'les-acacias' ),
'not_found_in_trash' => __( 'Not found in Trash', 'les-acacias' ),
);
$args = array(
'label' => __( 'bloc', 'les-acacias' ),
'description' => __( 'Home Page Bloc', 'les-acacias' ),
'labels' => $labels,
'supports' => array( 'title', 'excerpt', 'thumbnail', 'page-attributes', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-layout',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => false,
'rewrite' => false,
'capability_type' => 'page',
);
register_post_type( 'home-tile', $args );
}
add_action( 'init', 'home_tile', 0 );
}