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' ); add_image_size( 'post-thumb', 370,210, array( 'center', 'top' ) ); add_image_size( 'post-mix-thumb', 680,415, array( 'center', 'top' ) ); add_image_size( 'single-thumb', 770,330, array( 'center', 'top' ) ); add_image_size( 'slider-cover', 1100,450, array( 'center', 'top' ) ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'bastille' ), ) ); /* * 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', ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); } endif; add_action( 'after_setup_theme', 'bastille_setup' ); /** * Recommend the Kirki plugin */ require get_template_directory() . '/inc/include-kirki.php'; /** * Load the Kirki Fallback class * Making sure that output works when Kirki is not installed */ require get_template_directory() . '/inc/kirki-fallback.php'; /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function bastille_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Home sidebar', 'bastille' ), 'id' => 'sidebar-home', 'description' => esc_html__( 'Add widgets here.', 'bastille' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => esc_html__( 'Single sidebar', 'bastille' ), 'id' => 'sidebar-main', 'description' => esc_html__( 'Add widgets here.', 'bastille' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => esc_html__( 'Banner top', 'bastille' ), 'id' => 'banner-top', 'description' => esc_html__( 'Add the top banner ici.', 'bastille' ), 'before_widget' => '', 'after_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer', 'bastille' ), 'id' => 'footer-1', 'description' => esc_html__( 'Add widgets here.', 'bastille' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', 'after_title' => '
', ) ); } add_action( 'widgets_init', 'bastille_widgets_init' ); /** * Enqueue scripts and styles. */ function bastille_scripts() { // Google fonts wp_enqueue_style( 'bastille-google-fonts', 'http://fonts.googleapis.com/css?family=Lora|Roboto:500|Playfair+Display:700', false ); // CSS wp_enqueue_style( 'normalize', get_template_directory_uri().'/css/normalize.min.css' ); wp_enqueue_style( 'foundation-css', get_template_directory_uri().'/css/foundation.css' ); wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/css/font-awesome.min.css' ); wp_enqueue_style( 'motion-ui', 'https://cdnjs.cloudflare.com/ajax/libs/motion-ui/1.1.1/motion-ui.css' ); wp_enqueue_style( 'slick-slider', get_template_directory_uri().'/css/slick.css'); $style = "style"; if(""!=get_theme_mod('bastille_theme_color')){ $color = get_theme_mod('bastille_theme_color'); $style = 'style-'.$color; } wp_enqueue_style( 'bastille-style', get_template_directory_uri().'/css/'.$style.'.css' ); // JS wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'modernizer', get_template_directory_uri().'/js/modernizr.min.js', true); wp_enqueue_script( 'foundation-js', get_template_directory_uri().'/js/foundation.min.js', true); wp_enqueue_script( 'scroll-reveal', get_template_directory_uri().'/js/scrollreveal.min.js', true); wp_enqueue_script( 'slick-slider', get_template_directory_uri().'/js/slick.min.js','1.6.0', true); wp_enqueue_script( 'main-scripts', get_template_directory_uri().'/js/scripts.js'); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } function bastille_admin_js($hook) { /* if ( 'customize.php' != $hook ) { return; } */ wp_enqueue_script( 'bastille_admin_js', get_template_directory_uri() . '/js/admin.js' ); } add_action( 'wp_enqueue_scripts', 'bastille_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'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php';