date_default_timezone_set('America/Chicago'); define('WP_SCSS_ALWAYS_RECOMPILE', false); //change to false on website launch add_action( 'after_setup_theme', 'register_my_menu' ); function register_my_menu() { register_nav_menu( 'primary', __( 'Primary Menu', 'theme-slug' ) ); } function cfs_scripts() { wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'bootstrap', scripts() . '/bootstrap.bundle.min.js', 'jquery', '4.1.1', true ); wp_enqueue_script( 'slick', scripts() . '/slick.min.js', '', '1.0.0', true ); wp_enqueue_script( 'custom-scripts', scripts() . '/custom-scripts.js', '', '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'cfs_scripts' ); add_filter('show_admin_bar', '__return_false'); add_theme_support( 'post-thumbnails' ); //wide image sizes //add_image_size( 'max-wide', 3840, 2160, true ); //show favicon on login and in admin function add_favicon() { $favicon_url = get_stylesheet_directory_uri() . '/images/favicons/favicon.ico'; echo ''; } // Now, just make sure that function runs when you're on the login page and admin pages add_action('login_head', 'add_favicon'); add_action('admin_head', 'add_favicon'); //require_once('Mobile_Detect.php'); //$detect = new Mobile_Detect; function images(){ return get_bloginfo( 'template_directory' ) . '/images'; } function scripts(){ return get_bloginfo( 'template_directory' ) . '/js'; } function styles(){ return get_bloginfo( 'template_directory' ) . '/css'; } if( function_exists('acf_add_options_page') ) { acf_add_options_page(array( 'page_title' => 'Custom Theme Settings', 'menu_title' => 'Custom Settings', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => false )); } add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' ); //year shortcode function year_shortcode() { $year = date('Y'); return $year; } add_shortcode('year', 'year_shortcode'); ?> 0, //'date_format' => get_option( 'date_format' ), 'title_li' => '', 'echo' => 0, 'authors' => '', 'sort_column' => 'menu_order', 'link_before' => '', 'link_after' => '', 'exclude' => '7,459' ); $menu_pages = wp_list_pages($args); $logo = get_field('logo', 'options'); $header_bgs = get_field('header_background'); $header_slides = ''; $active = 'active'; if($header_bgs): foreach($header_bgs as $header_bg): $header_slides .= '
'; $active = ''; endforeach; else: $header_slides .= ''; endif; ?>