Current File : //home/quantums/gsc-ltd.net/wp-content/themes/twentyseventeen-child/functions.php
<?php function mychildtheme_enqueue_styles() {
    $parent_style = 'parent-style';

    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style )
    );
}
add_action( 'wp_enqueue_scripts', 'mychildtheme_enqueue_styles' );

add_action('get_header', 'my_filter_head');

function my_filter_head() {
   remove_action('wp_head', '_admin_bar_bump_cb');
} 
function twentyseventeen_child_widgets_init() {
	register_sidebar( array(
		'name'          => __( 'Header-Phone', 'twentyseventeen' ),
		'id'            => 'sidebar-4',
		'description'   => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ),
		'before_widget' => '',
		'after_widget'  => '',
		'before_title'  => '',
		'after_title'   => '',
	) );
register_sidebar( array(
		'name'          => __( 'Header-Social', 'twentyseventeen' ),
		'id'            => 'sidebar-5',
		'description'   => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ),
		'before_widget' => '',
		'after_widget'  => '',
		'before_title'  => '',
		'after_title'   => '',
	) );
		register_sidebar( array(
		'name'          => __( 'Footer One', 'twentyseventeen' ),
		'id'            => 'sidebar-6',
		'description'   => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ),
		'before_widget' => '',
		'after_widget'  => '',
		'before_title'  => '',
		'after_title'   => '',
	) );
		register_sidebar( array(
		'name'          => __( 'Footer Two', 'twentyseventeen' ),
		'id'            => 'sidebar-7',
		'description'   => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ),
		'before_widget' => '',
		'after_widget'  => '',
		'before_title'  => '',
		'after_title'   => '',
	) );
}
add_action( 'widgets_init', 'twentyseventeen_child_widgets_init' );

// Creating a Deals Custom Post Type
function service_post_type() {
	$labels = array(
		'name'                => __( 'Services' ),
		'singular_name'       => __( 'Services'),
		'menu_name'           => __( 'Services'),
		'parent_item_colon'   => __( 'Parent Service'),
		'all_items'           => __( 'All Services'),
		'view_item'           => __( 'View Services'),
		'add_new_item'        => __( 'Add New Service'),
		'add_new'             => __( 'Add Services'),
		'edit_item'           => __( 'Edit Service'),
		'update_item'         => __( 'Update Service'),
		'search_items'        => __( 'Search Service'),
		'not_found'           => __( 'Not Found'),
		'not_found_in_trash'  => __( 'Not found in Trash')
	);
	$args = array(
		'label'               => __( 'services'),
		'description'         => __( 'Services'),
		'labels'              => $labels,
		'supports'            => array( 'title','wps_subtitle', 'editor', 'excerpt', 'author', 'comments', 'thumbnail', 'revisions', 'custom-fields'),
		'public'              => true,
		'hierarchical'        => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'has_archive'         => true,
		'can_export'          => true,
		'exclude_from_search' => false,
	    'yarpp_support'       => true,
		'taxonomies' 	      => array('service_category'),
		'publicly_queryable'  => true,
		'capability_type'     => 'page'
);
	register_post_type( 'services', $args );
}

add_action( 'init', 'service_post_type', 0);
function ourwork_post_type() {
	$labels = array(
		'name'                => __( 'Our Work' ),
		'singular_name'       => __( 'Our Work'),
		'menu_name'           => __( 'Our Work'),
		'parent_item_colon'   => __( 'Parent Our Work'),
		'all_items'           => __( 'All Our Work'),
		'view_item'           => __( 'View Our Work'),
		'add_new_item'        => __( 'Add New Our Work'),
		'add_new'             => __( 'Add Our Work'),
		'edit_item'           => __( 'Edit Our Work'),
		'update_item'         => __( 'Update Our Work'),
		'search_items'        => __( 'Search Our Work'),
		'not_found'           => __( 'Not Found'),
		'not_found_in_trash'  => __( 'Not found in Trash')
	);
	$args = array(
		'label'               => __( 'ourwork'),
		'description'         => __( 'Our Work'),
		'labels'              => $labels,
		'supports'            => array( 'title','wps_subtitle', 'editor', 'excerpt', 'author', 'comments', 'thumbnail', 'revisions', 'custom-fields'),
		'public'              => true,
		'hierarchical'        => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'has_archive'         => true,
		'can_export'          => true,
		'exclude_from_search' => false,
	    'yarpp_support'       => true,
		'taxonomies' 	      => array('ourwork_category'),
		'publicly_queryable'  => true,
		'capability_type'     => 'page'
);
	register_post_type( 'ourwork', $args );
}
add_action( 'init', 'ourwork_post_type', 0 );


function technology_post_type() {
	$labels = array(
		'name'                => __( 'Our Technology' ),
		'singular_name'       => __( 'Our Technology'),
		'menu_name'           => __( 'Our Technology'),
		'parent_item_colon'   => __( 'Parent Our Technology'),
		'all_items'           => __( 'All Our Technology'),
		'view_item'           => __( 'View Our Technology'),
		'add_new_item'        => __( 'Add New Our Technology'),
		'add_new'             => __( 'Add Our Technology'),
		'edit_item'           => __( 'Edit Our Technology'),
		'update_item'         => __( 'Update Our Technology'),
		'search_items'        => __( 'Search Our Technology'),
		'not_found'           => __( 'Not Found'),
		'not_found_in_trash'  => __( 'Not found in Trash')
	);
	$args = array(
		'label'               => __( 'technology'),
		'description'         => __( 'Our Technology'),
		'labels'              => $labels,
		'supports'            => array( 'title','wps_subtitle', 'editor', 'excerpt', 'author', 'comments', 'thumbnail', 'revisions', 'custom-fields'),
		'public'              => true,
		'hierarchical'        => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'has_archive'         => true,
		'can_export'          => true,
		'exclude_from_search' => false,
	    'yarpp_support'       => true,
		'taxonomies' 	      => array('ourtechnology_category'),
		'publicly_queryable'  => true,
		'capability_type'     => 'page'
);
	register_post_type( 'technology', $args );
}
add_action( 'init', 'technology_post_type', 0 );

function testimonial_post_type() {
	$labels = array(
		'name'                => __( 'Our Testimonial' ),
		'singular_name'       => __( 'Our Testimonial'),
		'menu_name'           => __( 'Our Testimonial'),
		'parent_item_colon'   => __( 'Parent Our Testimonial'),
		'all_items'           => __( 'All Our Testimonial'),
		'view_item'           => __( 'View Our Testimonial'),
		'add_new_item'        => __( 'Add New Our Testimonial'),
		'add_new'             => __( 'Add Our Testimonial'),
		'edit_item'           => __( 'Edit Our Testimonial'),
		'update_item'         => __( 'Update Our Testimonial'),
		'search_items'        => __( 'Search Our Testimonial'),
		'not_found'           => __( 'Not Found'),
		'not_found_in_trash'  => __( 'Not found in Trash')
	);
	$args = array(
		'label'               => __( 'testimonial'),
		'description'         => __( 'Our Testimonial'),
		'labels'              => $labels,
		'supports'            => array( 'title','wps_subtitle', 'editor', 'excerpt', 'author', 'comments', 'thumbnail', 'revisions', 'custom-fields'),
		'public'              => true,
		'hierarchical'        => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'has_archive'         => true,
		'can_export'          => true,
		'exclude_from_search' => false,
	    'yarpp_support'       => true,
		'taxonomies' 	      => array('ourTestimonial_category'),
		'publicly_queryable'  => true,
		'capability_type'     => 'page'
);
	register_post_type( 'testimonial', $args );
}
add_action( 'init', 'testimonial_post_type', 0 );