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( 'small-thumbnails', 360, 202, true ); add_image_size( 'blog-thumbnails', 708, 400, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'blocal' ), ) ); /* * 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', ) ); /* * Enable support for Post Formats. * See https://developer.wordpress.org/themes/functionality/post-formats/ */ // add_theme_support( 'post-formats', array( // 'aside', // 'image', // 'video', // 'quote', // 'link', // ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'blocal_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'blocal_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 blocal_content_width() { $GLOBALS['content_width'] = apply_filters( 'blocal_content_width', 640 ); } add_action( 'after_setup_theme', 'blocal_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function blocal_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'blocal' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); // First Footer Widget register_sidebar(array( 'name' => __('First Footer Widget Area', 'blocal'), 'id' => 'first-footer-widget-area', 'description' => '', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // Second Footer Widget register_sidebar(array( 'name' => __('Second Footer Widget Area', 'blocal'), 'id' => 'second-footer-widget-area', 'description' => '', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // Third Footer Widget register_sidebar(array( 'name' => __('Third Footer Widget Area', 'blocal'), 'id' => 'third-footer-widget-area', 'description' => '', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'blocal_widgets_init' ); /** * Enqueue scripts and styles. */ function blocal_styles() { wp_enqueue_style( 'blocal-font-open-sans', '//fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,800'); wp_enqueue_style( 'blocal-font-raleway', '//fonts.googleapis.com/css?family=Raleway:400,500,600,700,400italic,700italic,800,900'); wp_enqueue_style( 'blocal-bootstrap', get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( 'blocal-flexslider', get_template_directory_uri() . '/css/flexslider.css' ); wp_enqueue_style( 'blocal-fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css' ); wp_enqueue_style( 'blocal-mmenu', get_template_directory_uri() . '/css/jquery.mmenu.css' ); wp_enqueue_style( 'blocal-animatetion', get_template_directory_uri() . '/css/animate.css' ); wp_enqueue_style( 'blocal-style', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'blocal_styles' ); function blocal_scripts() { wp_enqueue_script( 'blocal-flexslider-script', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array('jquery') ); wp_enqueue_script( 'blocal-navigation', get_template_directory_uri() . '/js/navigation.js', array('jquery'), '20120206', true ); wp_enqueue_script( 'blocal-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); wp_enqueue_script( 'blocal-mmenu-script', get_template_directory_uri() . '/js/jquery.mmenu.min.js', array('jquery'), '20130116' ); wp_enqueue_script( 'blocal-wow-script', get_template_directory_uri() . '/js/wow.js', array('jquery'), '20130116' ); wp_enqueue_script( 'blocal-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), true); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'blocal_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'; /** * Custom-Customizer additions. */ require get_template_directory() . '/inc/custom-customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Load Lead Form files. */ require get_template_directory() . '/inc/lead_form_model.php'; function install_blocal_table(){ $obj = new lead_form_model(); $obj->install_blocal_table(); } add_action('after_switch_theme', 'install_blocal_table'); function blocal_leads_menu(){ add_theme_page('Blocal leads', 'Blocal Leads', 'read', 'blocal_leads', 'blocal_leads_table'); } add_action('admin_menu', 'blocal_leads_menu'); function custom_theme_color(){ $custom_theme_color = get_theme_mod( 'custom_theme_color' ); if ( $custom_theme_color != '#40bc69' && $custom_theme_color != '' ) : ?> '.$custom_css.''; } add_action('wp_head', 'custom_css'); function initilize_wow_js(){ $animation_option = esc_attr( get_theme_mod('animation_option', 'on') ); if($animation_option=='on'){ ?>