/** * custom theme functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package custom_theme */ if ( ! defined( '_S_VERSION' ) ) { // Replace the version number of the theme on each release. define( '_S_VERSION', '1.0.0' ); } require_once(get_stylesheet_directory() . '/theme-options.php'); if ( ! function_exists( 'custom_theme_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. */ function custom_theme_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on custom theme, use a find and replace * to change 'custom-theme' to the name of your theme in all the template files. */ load_theme_textdomain( 'custom-theme', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'custom-theme' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'style', 'script', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'custom_theme_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); } endif; add_action( 'after_setup_theme', 'custom_theme_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function custom_theme_content_width() { $GLOBALS['content_width'] = apply_filters( 'custom_theme_content_width', 640 ); } add_action( 'after_setup_theme', 'custom_theme_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function custom_theme_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'custom-theme' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'custom-theme' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'custom_theme_widgets_init' ); /** * Enqueue scripts and styles. */ function custom_theme_scripts() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css',false,'1.1','all'); wp_enqueue_style( 'custom-css', get_template_directory_uri() . '/css/custom.css',false,'1.1','all'); wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/css/style.css',false,'1.1','all'); wp_enqueue_style( 'swiper-css', get_template_directory_uri() . '/assets/css/swiper-bundle.min.css',false,'1.1','all'); wp_enqueue_style( 'slick-css', get_template_directory_uri() . '/css/slick.min.css',false,'1.1','all'); wp_enqueue_style( 'custom-theme-style', get_stylesheet_uri(), array(), _S_VERSION ); wp_style_add_data( 'custom-theme-style', 'rtl', 'replace' ); wp_enqueue_style( 'custom-style-new', get_template_directory_uri() . '/assets/css/new-stylemain.css',false,'1.1','all'); wp_enqueue_style( 'reponsive-style-new', get_template_directory_uri() . '/assets/css/reponsive-mobile.css', false ,'3.1','all'); // resposive wp_enqueue_style( 'default-responsive', get_template_directory_uri() . '/assets/css/responsive/default-responsive.css',false,'1.1','all'); wp_enqueue_style( 'restaurant-pos-responsive', get_template_directory_uri() . '/assets/css/responsive/restaurant-pos-responsive.css',false,'1.1','all'); wp_enqueue_style( 'online-ordering-responsive', get_template_directory_uri() . '/assets/css/responsive/online-ordering-responsive.css',false,'1.1','all'); wp_enqueue_style( 'about-new-responsive', get_template_directory_uri() . '/assets/css/responsive/about-new-responsive.css',false,'1.1','all'); wp_enqueue_script( 'custom-theme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true ); wp_enqueue_script( 'jquery-script', get_template_directory_uri() . '/js/jquery.min.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'slick-min', get_template_directory_uri() . '/js/slick.min.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'swiper-min', get_template_directory_uri() . '/assets/js/swiper-bundle.min.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'bootstrap-popper', get_template_directory_uri() . '/js/popper.min.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'bootstrap-min', get_template_directory_uri() . '/js/bootstrap.min.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'intersection-observer', get_template_directory_uri() . '/js/intersection-observer.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'svgConvert-min', get_template_directory_uri() . '/js/svgConvert.min.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'custom-min', get_template_directory_uri() . '/js/custom.js', array ( 'jquery' ), 1.1, true); wp_enqueue_script( 'fancybox', get_template_directory_uri() . '/js/fancybox.js', array ( 'jquery' ), 1.1, true); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'custom_theme_scripts' ); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; } add_action('init', 'industries'); function industries() { $labels = array( 'name' => _x('Industries', 'post type general name'), 'singular_name' => _x('industries', 'post type singular name'), 'add_new' => _x('Add New', 'Industries'), 'add_new_item' => __('Add New Industries'), 'edit_item' => __('Edit Industries'), 'new_item' => __('New Industries'), 'view_item' => __('View Industries'), 'search_items' => __('Search Industries'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor') ); register_post_type('industries', $args); } //partners Post Type add_action('init', 'Partners'); function partners() { $labels = array( 'name' => _x('Partners', 'post type general name'), 'singular_name' => _x('partners', 'post type singular name'), 'add_new' => _x('Add New', 'Partners'), 'add_new_item' => __('Add New Partners'), 'edit_item' => __('Edit Partners'), 'new_item' => __('New Partners'), 'view_item' => __('View Partners'), 'search_items' => __('Search Partners'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'editor') ); register_post_type('partners', $args); } //faq Post Type add_action('init', 'Faq'); function faq() { $labels = array( 'name' => _x('Faq', 'post type general name'), 'singular_name' => _x('faq', 'post type singular name'), 'add_new' => _x('Add New', 'Faq'), 'add_new_item' => __('Add New Faq'), 'edit_item' => __('Edit Faq'), 'new_item' => __('New Faq'), 'view_item' => __('View Faq'), 'search_items' => __('Search Faq'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor') ); register_post_type('faq', $args); } if ( ! function_exists( 'faq_taxonomies' ) ) { // Register Custom Taxonomy function faq_taxonomies() { $labels = array( 'name' => _x( 'FAQ Pages', 'Taxonomy General Name', 'text_domain' ), 'singular_name' => _x( 'FAQ Page', 'Taxonomy Singular Name', 'text_domain' ), 'menu_name' => __( 'FAQ Pages', 'text_domain' ), 'all_items' => __( 'All Items', 'text_domain' ), 'parent_item' => __( 'Parent Item', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'new_item_name' => __( 'New Item Name', 'text_domain' ), 'add_new_item' => __( 'Add New Item', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ), 'add_or_remove_items' => __( 'Add or remove items', 'text_domain' ), 'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ), 'popular_items' => __( 'Popular Items', 'text_domain' ), 'search_items' => __( 'Search Items', 'text_domain' ), 'not_found' => __( 'Not Found', 'text_domain' ), 'no_terms' => __( 'No items', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'public' => false, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'faq_taxonomy', array( 'faq' ), $args ); } add_action( 'init', 'faq_taxonomies', 0 ); } add_filter('wpcf7_autop_or_not', '__return_false'); //Payment Playns Post Type add_action('init', 'plan'); function plan() { $labels = array( 'name' => _x('Plan', 'post type general name'), 'singular_name' => _x('plan', 'post type singular name'), 'add_new' => _x('Add New', 'Plan'), 'add_new_item' => __('Add New Plan'), 'edit_item' => __('Edit Plan'), 'new_item' => __('New Plan'), 'view_item' => __('View Plan'), 'search_items' => __('Search Plan'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor') ); register_post_type('plan', $args); } add_filter('wpcf7_autop_or_not', '__return_false'); // Owners Post Type //Payment Playns Post Type add_action( 'init', 'ownertestimonial'); function ownertestimonial() { $labels = array( 'name' => _x('Owner Testimonials', 'post type general name'), 'singular_name' => _x('Owner Testimonials', 'post type singular name'), 'add_new' => _x('Add New', 'Owner Testimonials'), 'add_new_item' => __('Add Owner Testimonials'), 'edit_item' => __('Edit Owner Testimonials'), 'new_item' => __('New Owner Testimonials'), 'view_item' => __('View Owner Testimonials'), 'search_items' => __('Search Owner Testimonials'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor') ); register_post_type( 'owner_testimonial', $args ); } add_filter('wpcf7_autop_or_not', '__return_false'); //Time Support Post Type add_action('init', 'TimeSupport'); function timesupport() { $labels = array( 'name' => _x('TimeSupport', 'post type general name'), 'singular_name' => _x('timesupport', 'post type singular name'), 'add_new' => _x('Add New', 'TimeSupport'), 'add_new_item' => __('Add New TimeSupport'), 'edit_item' => __('Edit TimeSupport'), 'new_item' => __('New TimeSupport'), 'view_item' => __('View TimeSupport'), 'search_items' => __('Search TimeSupport'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'editor') ); register_post_type('timesupport', $args); } add_filter('wpcf7_autop_or_not', '__return_false'); // Blogs add_action( 'init', 'blogs' ); function blogs() { // Set UI labels for Custom Post Type $labels = array( 'name' => _x( 'Blogs', 'Post Type General Name'), 'singular_name' => _x( 'Blogs', 'Post Type Singular Name'), 'menu_name' => __( 'Blogs' ), 'parent_item_colon' => __( 'Parent Blogs' ), 'all_items' => __( 'All Blogs'), 'view_item' => __( 'View Blogs'), 'add_new_item' => __( 'Add New Blogs'), 'add_new' => __( 'Add New'), 'edit_item' => __( 'Edit Blogs' ), 'update_item' => __( 'Update Blogs' ), 'search_items' => __( 'Search Blogs' ), 'not_found' => __( 'Not Found' ), 'not_found_in_trash' => __( 'Not found in Trash' ), ); // Set other options for Custom Post Type $args = array( 'label' => __( 'blogs' ), 'description' => __( 'Blogs news and reviews' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'custom-fields', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'show_in_rest' => true, // This is where we add taxonomies to our CPT 'taxonomies' => array( 'category' ), ); // Registering your Custom Post Type register_post_type( 'blogs', $args ); } // Recent Event add_action( 'init', 'recentevent' ); function recentevent() { // Set UI labels for Custom Post Type $labels = array( 'name' => _x( 'Events', 'Post Type General Name'), 'singular_name' => _x( 'Events', 'Post Type Singular Name'), 'menu_name' => __( 'Events' ), 'parent_item_colon' => __( 'Parent Events' ), 'all_items' => __( 'All Events'), 'view_item' => __( 'View Events'), 'add_new_item' => __( 'Add New Events'), 'add_new' => __( 'Add New'), 'edit_item' => __( 'Edit Events' ), 'update_item' => __( 'Update Events' ), 'search_items' => __( 'Search Events' ), 'not_found' => __( 'Not Found' ), 'not_found_in_trash' => __( 'Not found in Trash' ), ); // Set other options for Custom Post Type $args = array( 'label' => __( 'recentevent' ), 'description' => __( 'Events' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'show_in_rest' => true, // This is where we add taxonomies to our CPT 'taxonomies' => array( 'event_category' ), ); // Registering your Custom Post Type register_post_type( 'recentevent', $args ); } /* ------------------------------------------Custom Post Type for Portfolio ----------------------------------------------------------- */ add_action('init', 'casestudy'); function casestudy() { $labels = array( 'name' => _x('Case Study', 'post type general name'), 'singular_name' => _x('casestudy', 'post type singular name'), 'add_new' => _x('Add New', 'Case Study'), 'add_new_item' => __('Add New Case Study'), 'edit_item' => __('Edit Case Study'), 'new_item' => __('New Case Study'), 'view_item' => __('View Case Study'), 'search_items' => __('Search Case Study'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '', ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor'), ); register_post_type('casestudy', $args); } // Register Brand Size Case Studies function brand_size() { $labels = array( 'name' => _x( 'Case Study Brands', 'Taxonomy General Name', 'casestudy' ), 'singular_name' => _x( 'Case Study Brand', 'Taxonomy Singular Name', 'casestudy' ), 'menu_name' => __( 'Case Study Brand', 'casestudy' ), 'all_items' => __( 'All Items', 'casestudy' ), 'parent_item' => __( 'Parent Item', 'casestudy' ), 'parent_item_colon' => __( 'Parent Item:', 'casestudy' ), 'new_item_name' => __( 'New Item Name', 'casestudy' ), 'add_new_item' => __( 'Add New Item', 'casestudy' ), 'edit_item' => __( 'Edit Item', 'casestudy' ), 'update_item' => __( 'Update Item', 'casestudy' ), 'view_item' => __( 'View Item', 'casestudy' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'casestudy' ), 'add_or_remove_items' => __( 'Add or remove items', 'casestudy' ), 'choose_from_most_used' => __( 'Choose from the most used', 'casestudy' ), 'popular_items' => __( 'Popular Items', 'casestudy' ), 'search_items' => __( 'Search Items', 'casestudy' ), 'not_found' => __( 'Not Found', 'casestudy' ), 'no_terms' => __( 'No items', 'casestudy' ), 'items_list' => __( 'Items list', 'casestudy' ), 'items_list_navigation' => __( 'Items list navigation', 'casestudy' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'casestudy_brand', array( 'casestudy' ), $args ); } add_action( 'init', 'brand_size', 0 ); // Register Industry Case Study function industry_case() { $labels = array( 'name' => _x( 'Case Industries', 'Taxonomy General Name', 'casestudy' ), 'singular_name' => _x( 'Case Industry', 'Taxonomy Singular Name', 'casestudy' ), 'menu_name' => __( 'Case Industry', 'casestudy' ), 'all_items' => __( 'All Items', 'casestudy' ), 'parent_item' => __( 'Parent Item', 'casestudy' ), 'parent_item_colon' => __( 'Parent Item:', 'casestudy' ), 'new_item_name' => __( 'New Item Name', 'casestudy' ), 'add_new_item' => __( 'Add New Item', 'casestudy' ), 'edit_item' => __( 'Edit Item', 'casestudy' ), 'update_item' => __( 'Update Item', 'casestudy' ), 'view_item' => __( 'View Item', 'casestudy' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'casestudy' ), 'add_or_remove_items' => __( 'Add or remove items', 'casestudy' ), 'choose_from_most_used' => __( 'Choose from the most used', 'casestudy' ), 'popular_items' => __( 'Popular Items', 'casestudy' ), 'search_items' => __( 'Search Items', 'casestudy' ), 'not_found' => __( 'Not Found', 'casestudy' ), 'no_terms' => __( 'No items', 'casestudy' ), 'items_list' => __( 'Items list', 'casestudy' ), 'items_list_navigation' => __( 'Items list navigation', 'casestudy' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'casestudy_industry', array( 'casestudy' ), $args ); } add_action( 'init', 'industry_case', 0 ); // Register Case Study Country function casestudy_country() { $labels = array( 'name' => _x( 'Case Study Countries', 'Taxonomy General Name', 'casestudy' ), 'singular_name' => _x( 'Case Study Country', 'Taxonomy Singular Name', 'casestudy' ), 'menu_name' => __( 'Case Study Country', 'casestudy' ), 'all_items' => __( 'All Items', 'casestudy' ), 'parent_item' => __( 'Parent Item', 'casestudy' ), 'parent_item_colon' => __( 'Parent Item:', 'casestudy' ), 'new_item_name' => __( 'New Item Name', 'casestudy' ), 'add_new_item' => __( 'Add New Item', 'casestudy' ), 'edit_item' => __( 'Edit Item', 'casestudy' ), 'update_item' => __( 'Update Item', 'casestudy' ), 'view_item' => __( 'View Item', 'casestudy' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'casestudy' ), 'add_or_remove_items' => __( 'Add or remove items', 'casestudy' ), 'choose_from_most_used' => __( 'Choose from the most used', 'casestudy' ), 'popular_items' => __( 'Popular Items', 'casestudy' ), 'search_items' => __( 'Search Items', 'casestudy' ), 'not_found' => __( 'Not Found', 'casestudy' ), 'no_terms' => __( 'No items', 'casestudy' ), 'items_list' => __( 'Items list', 'casestudy' ), 'items_list_navigation' => __( 'Items list navigation', 'casestudy' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'case_country', array( 'casestudy' ), $args ); } add_action( 'init', 'casestudy_country', 0 ); /* ------------------------------------------Custom Post Type for Pricing ----------------------------------------------------------- */ add_action('init', 'pricing'); function pricing() { $labels = array( 'name' => _x('Pricing', 'post type general name'), 'singular_name' => _x('pricing', 'post type singular name'), 'add_new' => _x('Add New', 'Pricing'), 'add_new_item' => __('Add New Pricing'), 'edit_item' => __('Edit Pricing'), 'new_item' => __('New Pricing'), 'view_item' => __('View Pricing'), 'search_items' => __('Search Pricing'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '', ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor'), ); register_post_type('pricing', $args); } // Register Pricing Taxonomy add_action( 'init', 'pricing_taxonomy', 0 ); function pricing_taxonomy() { $labels = array( 'name' => _x( 'Pricings', 'Taxonomy General Name', 'pricing' ), 'singular_name' => _x( 'Pricing', 'Taxonomy Singular Name', 'pricing' ), 'menu_name' => __( 'Pricing Taxonomy', 'pricing' ), 'all_items' => __( 'All Pricings', 'pricing_taxonomy' ), 'parent_item' => __( 'Parent Pricing', 'pricing' ), 'parent_item_colon' => __( 'Parent Pricing:', 'pricing' ), 'new_item_name' => __( 'New Pricing Name', 'pricing' ), 'add_new_item' => __( 'Add New Pricing', 'pricing' ), 'edit_item' => __( 'Edit Pricing', 'pricing' ), 'update_item' => __( 'Update Pricing', 'pricing' ), 'view_item' => __( 'View Item', 'pricing' ), 'separate_items_with_commas' => __( 'Separate Pricing with commas', 'pricing' ), 'add_or_remove_items' => __( 'Add or remove Pricing', 'pricing' ), 'choose_from_most_used' => __( 'Choose from the most used pricings', 'pricing' ), 'popular_items' => __( 'Popular Items', 'pricing' ), 'search_items' => __( 'Search Pricing', 'pricing' ), 'not_found' => __( 'Not Found', 'pricing' ), 'no_terms' => __( 'No items', 'pricing' ), 'items_list' => __( 'Items list', 'pricing' ), 'items_list_navigation' => __( 'Items list navigation', 'pricing' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'taxonmy_price', array( 'pricing' ), $args ); } /* ------------------------------------------Custom Post Type for Restaurant Landing Page ----------------------------------------------------------- */ add_action('init', 'restaurant_landing'); function restaurant_landing() { $labels = array( 'name' => _x('Restaurants', 'post type general name'), 'singular_name' => _x('Resturant', 'post type singular name'), 'add_new' => _x('Add New', 'Restaurant Post'), 'add_new_item' => __('Add New Restaurant Post'), 'edit_item' => __('Edit Restaurant Post'), 'new_item' => __('New Restaurant Post'), 'view_item' => __('View Restaurant Post'), 'search_items' => __('Search Restaurant Post'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '', ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor'), ); register_post_type('restaurant_landing', $args); } // Register Resturant Taxonomy add_action( 'init', 'restaurant_taxonomy', 0 ); function restaurant_taxonomy() { $labels = array( 'name' => _x( 'Resturants', 'Taxonomy General Name', 'restaurant_landing' ), 'singular_name' => _x( 'Resturant', 'Taxonomy Singular Name', 'restaurant_landing' ), 'menu_name' => __( 'Resturant Taxonomy', 'Resturant' ), 'all_items' => __( 'All Resturants', 'restaurant_taxonomy' ), 'parent_item' => __( 'Parent Resturant', 'Resturant' ), 'parent_item_colon' => __( 'Parent Resturant:', 'Resturant' ), 'new_item_name' => __( 'New Resturant Name', 'Resturant' ), 'add_new_item' => __( 'Add New Resturant', 'Resturant' ), 'edit_item' => __( 'Edit Resturant', 'Resturant' ), 'update_item' => __( 'Update Resturant', 'Resturant' ), 'view_item' => __( 'View Item', 'Resturant' ), 'separate_items_with_commas' => __( 'Separate Resturant with commas', 'Resturant' ), 'add_or_remove_items' => __( 'Add or remove Resturant', 'Resturant' ), 'choose_from_most_used' => __( 'Choose from the most used Resturants', 'Resturant' ), 'popular_items' => __( 'Popular Items', 'Resturant' ), 'search_items' => __( 'Search Resturant', 'Resturant' ), 'not_found' => __( 'Not Found', 'restaurant_landing' ), 'no_terms' => __( 'No items', 'Resturant' ), 'items_list' => __( 'Items list', 'Resturant' ), 'items_list_navigation' => __( 'Items list navigation', 'Resturant' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'restaurant_taxonomy', array( 'restaurant_landing' ), $args ); } /* ------------------------------------------Custom Post Type for Restaurant Landing Page ----------------------------------------------------------- */ add_action('init', 'restaurant_types'); function restaurant_types() { $labels = array( 'name' => _x('Restaurant Types', 'post type general name'), 'singular_name' => _x('Restaurant Type', 'post type singular name'), 'add_new' => _x('Add New', 'Restaurant Type'), 'add_new_item' => __('Add New Restaurant Type'), 'edit_item' => __('Edit Restaurant Type'), 'new_item' => __('New Restaurant Type'), 'view_item' => __('View Restaurant Type'), 'search_items' => __('Search Restaurant Type'), 'not_found' => __('Nothing found'), 'not_found_in_trash' => __('Nothing found in Trash'), 'parent_item_colon' => '', ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'thumbnail', 'editor'), ); register_post_type('restaurant_types', $args); } // Register Restaurant Type Taxonomy add_action( 'init', 'restaurant_type_taxonomy', 0 ); function restaurant_type_taxonomy() { $labels = array( 'name' => _x( 'Restaurant Types', 'Taxonomy General Name', 'restaurant_types' ), 'singular_name' => _x( 'Restaurant Type', 'Taxonomy Singular Name', 'restaurant_types' ), 'menu_name' => __( 'Restaurant Type Taxonomy', 'Resturant' ), 'all_items' => __( 'All Restaurant Type', 'restaurant_types' ), 'parent_item' => __( 'Parent Restaurant Type', 'Restaurant Type' ), 'parent_item_colon' => __( 'Parent Restaurant Type:', 'Restaurant Type' ), 'new_item_name' => __( 'New Restaurant Type Name', 'Restaurant Type' ), 'add_new_item' => __( 'Add New Restaurant Type', 'Restaurant Type' ), 'edit_item' => __( 'Edit Restaurant Type', 'Restaurant Type' ), 'update_item' => __( 'Update Restaurant Type', 'Restaurant Type' ), 'view_item' => __( 'View Item', 'Restaurant Type' ), 'separate_items_with_commas' => __( 'Separate Restaurant Type with commas', 'Restaurant Type' ), 'add_or_remove_items' => __( 'Add or remove Restaurant Type', 'Restaurant Type' ), 'choose_from_most_used' => __( 'Choose from the most used Restaurant Types', 'Restaurant Type' ), 'popular_items' => __( 'Popular Items', 'Restaurant Type' ), 'search_items' => __( 'Search Restaurant Type', 'Restaurant Type' ), 'not_found' => __( 'Not Found', 'restaurant_landing' ), 'no_terms' => __( 'No items', 'Restaurant Type' ), 'items_list' => __( 'Items list', 'Restaurant Type' ), 'items_list_navigation' => __( 'Items list navigation', 'Restaurant Type' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'restaurant_type_taxonomy', array( 'restaurant_types' ), $args ); } // ajax url // function my_enqueue() { // wp_localize_script( 'ajax-script', 'my_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) ); // } // add_action( 'wp_enqueue_scripts', 'my_enqueue' ); // Search Filter add_action( 'wp_ajax_casestudy_filter', 'my_action' ); add_action( 'wp_ajax_nopriv_casestudy_filter', 'my_action' ); function my_action() { $html = ''; $brand_taxonomy = $_POST['brand_taxonomy']; $industry_taxonomy = $_POST['industry_taxonomy']; $country_taxonomy = $_POST['country_taxonomy']; $search_case = $_POST['search_casestudy']; $args = array( 'post_type' => 'casestudy', 'post_status' => 'publish', 'tax_query' => array('relation' => 'AND') ); if($search_case != '') { $args['s'] = $search_case; } if($brand_taxonomy != ''){ array_push($args['tax_query'], array( 'taxonomy' => 'casestudy_brand', 'field' => 'slug', 'terms' => $brand_taxonomy, )); } if($industry_taxonomy != ''){ array_push($args['tax_query'], array( 'taxonomy' => 'casestudy_industry', 'field' => 'slug', 'terms' => $industry_taxonomy, )); } if($country_taxonomy != ''){ array_push($args['tax_query'], array( 'taxonomy' => 'case_country', 'field' => 'slug', 'terms' => $country_taxonomy, )); } $query = new WP_Query($args); while ($query->have_posts()) : $query->the_post(); $html .= '<div class="col-md-6"> <figure> <span><img src="'.get_the_post_thumbnail_url().'"></span> <figcaption> <ins><img src="'.get_field('case_logo').'"></ins> <h3>'.get_the_title().'</h3> '.get_the_content().' <a class="cbtn" href="'.get_the_permalink().'">View Case Study </a> </figcaption> </figure> </div>'; endwhile; echo $html; // var_dump($args); wp_die(); } add_action( 'after_setup_theme', 'setup_woocommerce_support' ); function setup_woocommerce_support() { add_theme_support('woocommerce'); } remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); add_filter( 'woocommerce_add_error', 'custom_add_view_cart_button_to_error_message' ); function custom_add_view_cart_button_to_error_message( $message ) { // Append a "View Cart" button to the existing error message $message .= '<br><a href="' . esc_url( wc_get_cart_url() ) . '" class="button wc-forward">View Cart</a>'; return $message; } add_filter( 'woocommerce_checkout_fields', 'custom_checkout_fields_labels' ); function custom_checkout_fields_labels( $fields ) { $fields['billing']['billing_first_name']['label'] = 'Billing Details'; $fields['shipping']['shipping_first_name']['label'] = 'Shipping Details'; return $fields; } add_filter( 'woocommerce_checkout_heading', 'custom_checkout_heading', 20, 2 ); function custom_checkout_heading( $heading, $type ) { if ( $type === 'billing' ) { $heading = 'Billing Details'; } return $heading; } add_filter( 'woocommerce_checkout_sections', 'custom_checkout_sections' ); function custom_checkout_sections( $sections ) { if ( isset( $sections['billing'] ) ) { $sections['billing']['title'] = 'Billing sdfsdf'; } return $sections; } // add_action( 'woocommerce_add_to_cart', 'custom_remove_cart_items_for_specific_products', 10, 6 ); // function custom_remove_cart_items_for_specific_products( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ) { // // Array of product IDs for which the cart should be emptied // $specific_product_ids = array( 1907, 1937, 19 ); // // Check if the added product is in the specified array // if ( in_array( $product_id, $specific_product_ids ) ) { // // Access the global WooCommerce cart object // global $woocommerce; // // Loop through the cart items // foreach ( $woocommerce->cart->get_cart() as $key => $item ) { // // Remove the item from the cart // $woocommerce->cart->remove_cart_item( $key ); // } // } // } // // // <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//serveeasy.co/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://serveeasy.co/post-sitemap.xml</loc> <lastmod>2026-04-13T15:08:51+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/page-sitemap.xml</loc> <lastmod>2024-08-30T14:43:39+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/product-sitemap.xml</loc> <lastmod>2024-04-04T11:30:04+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/lp_course-sitemap.xml</loc> <lastmod>2024-02-24T00:31:41+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/lp_lesson-sitemap.xml</loc> <lastmod>2024-02-24T00:28:33+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/category-sitemap.xml</loc> <lastmod>2026-04-13T15:08:51+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/product_cat-sitemap.xml</loc> <lastmod>2024-04-04T11:30:04+00:00</lastmod> </sitemap> <sitemap> <loc>https://serveeasy.co/author-sitemap.xml</loc> <lastmod>2024-03-01T09:08:11+00:00</lastmod> </sitemap> </sitemapindex> <!-- XML Sitemap generated by Yoast SEO -->