/** * Commercial Vista Investments functions and definitions * * @link https://developer.wordpress.org/themes/basics/theme-functions/ * * @package Commercial_Vista_Investments */ require_once(get_template_directory() . '/admin/class-wp-bootstrap-navwalker.php'); if ( ! defined( '_S_VERSION' ) ) { // Replace the version number of the theme on each release. define( '_S_VERSION', '1.0.0' ); } /** * 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 commercial_vista_investments_setup() { /* * Make theme available for translation. * Translations can be filed in the /languages/ directory. * If you're building a theme based on Commercial Vista Investments, use a find and replace * to change 'commercial-vista-investments' to the name of your theme in all the template files. */ load_theme_textdomain( 'commercial-vista-investments', 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', 'commercial-vista-investments' ), ) ); /* * 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( 'commercial_vista_investments_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, ) ); } add_action( 'after_setup_theme', 'commercial_vista_investments_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 commercial_vista_investments_content_width() { $GLOBALS['content_width'] = apply_filters( 'commercial_vista_investments_content_width', 640 ); } add_action( 'after_setup_theme', 'commercial_vista_investments_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function commercial_vista_investments_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'commercial-vista-investments' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'commercial-vista-investments' ), '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', 'commercial_vista_investments_widgets_init' ); /** * Enqueue scripts and styles. */ define('SITE_URL', home_url()); define('THEME_PATH', get_template_directory() . '/'); define('THEME_URI', get_template_directory_uri() . '/'); define('THEME_CSS', THEME_URI . 'assets/css/'); define('THEME_JS', THEME_URI . 'assets/js/'); define('THEME_IMG', THEME_URI . 'assets/images/'); define('THEME_FONTS', THEME_URI . 'assets/fonts/'); define('DEFAULT_IMG', THEME_IMG . 'default.png'); define('themenamespace', wp_get_theme()); define('SITE_NAME', get_bloginfo('name')); define('SITE_TAGLINE', get_bloginfo('description')); function commercial_vista_investments_scripts() { wp_enqueue_style('all.css', 'https://pro.fontawesome.com/releases/v5.10.0/css/all.css'); wp_enqueue_style('swiper', 'https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css'); wp_enqueue_style('aos', THEME_CSS . 'aos.css'); wp_enqueue_style('bootstrap', THEME_CSS . 'bootstrap.min.css'); wp_enqueue_style('style', THEME_CSS . 'style.css'); wp_enqueue_style('responsive', THEME_CSS . 'responsive.css'); wp_enqueue_script('jquery'); wp_enqueue_script('bootstrap', THEME_JS . 'bootstrap.bundle.min.js', null, true); wp_enqueue_script('swiper', 'https://cdnjs.cloudflare.com/ajax/libs/Swiper/8.4.5/swiper-bundle.min.js', null, true); wp_enqueue_script('aos', THEME_JS . 'aos.js', null, true); wp_enqueue_script('custom-script', THEME_JS . 'custom.js', null, true); } add_action( 'wp_enqueue_scripts', 'commercial_vista_investments_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'; } // years dynamic function currentYear($atts) { return date('Y'); } add_shortcode('year', 'currentYear'); // Allow SVG function allow_svg($mimes) { $mimes['svg'] = 'image/svg+xml'; $mimes['svgz'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'allow_svg'); function fix_mime_type_svg($data = null, $file = null, $filename = null, $mimes = null) { $ext = isset($data['ext']) ? $data['ext'] : ''; if (strlen($ext) < 1) { $exploded = explode('.', $filename); $ext = strtolower(end($exploded)); } if ($ext === 'svg') { $data['type'] = 'image/svg+xml'; $data['ext'] = 'svg'; } elseif ($ext === 'svgz') { $data['type'] = 'image/svg+xml'; $data['ext'] = 'svgz'; } return $data; } add_filter('wp_check_filetype_and_ext', 'fix_mime_type_svg', 75, 4); function fix_svg() { echo '<style type="text/css"> .attachment-266x266, .thumbnail img { width: 100% !important; height: auto !important; } </style>'; } add_action('admin_head', 'fix_svg'); // allow span in acf Field function override_mce_options($initArray) { $opts = '*[*]'; $initArray['valid_elements'] = $opts; $initArray['extended_valid_elements'] = $opts; return $initArray; } add_filter('tiny_mce_before_init', 'override_mce_options'); // CONTACT FORM 7 REMOVE P TAGE add_filter('wpcf7_autop_or_not', '__return_false'); // Function for remove block editor widget style in apperance/widgets function disable_block_widgets() { remove_theme_support('widgets-block-editor'); } add_action('after_setup_theme', 'disable_block_widgets');<!doctype html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="profile" href="https://gmpg.org/xfn/11"> <meta name='robots' content='noindex, nofollow' /> <link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://commercialvista.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fcommercialvista.com%2F" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://commercialvista.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fcommercialvista.com%2F&format=xml" /> <style id="wp-img-auto-sizes-contain-inline-css"> img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px} /*# sourceURL=wp-img-auto-sizes-contain-inline-css */ </style> <style id="wp-emoji-styles-inline-css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 0.07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } /*# sourceURL=wp-emoji-styles-inline-css */ </style> <style id="wp-block-library-inline-css"> :root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}:root .has-text-align-center{text-align:center}:root .has-text-align-left{text-align:left}:root .has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{word-wrap:normal!important;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-color]){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}} /*# sourceURL=/wp-includes/css/dist/block-library/common.min.css */ </style> <style id="classic-theme-styles-inline-css"> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} /*# sourceURL=/wp-includes/css/classic-themes.min.css */ </style> <link rel='stylesheet' id='contact-form-7-css' href='https://commercialvista.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=6.1.6' media='all' /> <link rel="https://api.w.org/" href="https://commercialvista.com/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://commercialvista.com/wp-json/wp/v2/pages/128" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://commercialvista.com/xmlrpc.php?rsd" /> <meta name="generator" content="WordPress 7.0" /> <link rel="canonical" href="https://commercialvista.com/" /> <link rel='shortlink' href='https://commercialvista.com/' /> <link rel="icon" href="https://commercialvista.com/wp-content/uploads/2025/08/cropped-favicon-1-32x32.png" sizes="32x32" /> <link rel="icon" href="https://commercialvista.com/wp-content/uploads/2025/08/cropped-favicon-1-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://commercialvista.com/wp-content/uploads/2025/08/cropped-favicon-1-180x180.png" /> <meta name="msapplication-TileImage" content="https://commercialvista.com/wp-content/uploads/2025/08/cropped-favicon-1-270x270.png" /> </head> <body class="home wp-singular page-template page-template-templates page-template-tpl_home page-template-templatestpl_home-php page page-id-128 wp-theme-commercial-vista-investments"> <main class="main-wrpper"> <!-- Header --> <header> <div class="container"> <nav class="navbar navbar-expand-lg navbar-light"> <a class="navbar-brand" href="https://commercialvista.com/"> <img src="https://commercialvista.com/wp-content/uploads/2025/08/logo.svg" alt="" /> </a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#NavbarToggle" aria-controls="NavbarToggle" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="NavbarToggle"> <div class="nav-row"> <div class="topbar"> <div class="top-mail"> <a href="mailto:leads@commercialvista.com"> <p><i class="fas fa-envelope" aria-hidden="true"></i> leads@commercialvista.com</p> </a> </div> <div class="top-social-bx"> <h4>Follow Us:</h4> <a href="https://www.facebook.com/" target="_blank" rel="noopener noreferrer"> <figure> <img src="https://commercialvista.com/wp-content/uploads/2025/08/social-ic1.svg" alt=""> </figure> </a> <a href="https://www.instagram.com/" target="_blank" rel="noopener noreferrer"> <figure> <img src="https://commercialvista.com/wp-content/uploads/2025/08/social-ic2.svg" alt=""> </figure> </a> <a href="https://www.pinterest.com/" target="_blank" rel="noopener noreferrer"> <figure> <img src="https://commercialvista.com/wp-content/uploads/2025/08/social-ic3.svg" alt=""> </figure> </a> <a href="https://twitter.com/" target="_blank" rel="noopener noreferrer"> <figure> <img src="https://commercialvista.com/wp-content/uploads/2025/08/social-ic4.svg" alt=""> </figure> </a> </div> </div> <div class="navbar-nav">