<?php

// Register Custom Post Type featured_post
function create_post_type_featured_post() {
 
    $labels = array(
        'name'                => _x( 'Featured Posts', 'Post Type General Name', 'felicityhealth' ),
        'singular_name'       => _x( 'Featured Post', 'Post Type Singular Name', 'felicityhealth' ),
        'menu_name'           => __( 'Featured Posts', 'felicityhealth' ),
        'parent_item_colon'   => __( 'Parent Featured Post:', 'felicityhealth' ),
        'all_items'           => __( 'All Featured Posts', 'felicityhealth' ),
        'view_item'           => __( 'View Featured Post', 'felicityhealth' ),
        'add_new_item'        => __( 'Add New Post', 'felicityhealth' ),
        'add_new'             => __( 'Add New Post', 'felicityhealth' ),
        'edit_item'           => __( 'Edit Featured Post', 'felicityhealth' ),
        'update_item'         => __( 'Update Featured Post', 'felicityhealth' ),
        'search_items'        => __( 'Search Featured Post', 'felicityhealth' ),
        'not_found'           => __( 'No Featured Post found', 'felicityhealth' ),
        'not_found_in_trash'  => __( 'No Featured Post found in trash', 'felicityhealth' ),
    );
    $args = array(
        'label'               => __( 'Featured Post', 'felicityhealth' ),
        'description'         => __( 'Post Type Description', 'felicityhealth' ),
        'labels'              => $labels,
        'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'custom-fields', 'permalinks', 'featured_image' ),
        'show_in_rest'        => true,
        // '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'           => 'dashicons-columns',
        'can_export'          => true,
        'has_archive'         => true,
        'exclude_from_search' => false,
        'publicly_queryable'  => true,
        'capability_type'     => 'page',
        'register_meta_box_cb' => '',
    );
    register_post_type( 'Featured Post', $args );
 
 
}

// Hook into the 'init' action
add_action( 'init', 'create_post_type_featured_post', 0 );
  