'ffffff', 'default-image' => '', ) ) ); /* Add Menu Support */ add_theme_support('menus'); register_nav_menus( array( 'main-menu' => __('Main Menu', 'framework') ) ); /* Add Post Thumbnails Support and Related Image Sizes */ add_theme_support('post-thumbnails'); add_image_size('blog-page', 732, 9999, false); // For Blog Page add_image_size('default-page', 1140, 9999, false); // Default Page and Full Width Page add_image_size('blog-post-thumb', 732, 447, true); // For Home Blog Section and Gallery Slider on Single and Blog Page /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on ascent, use a find and replace * to change 'ascent' to the name of your theme in all the template files */ load_theme_textdomain( 'ascent', get_template_directory() . '/languages' ); } endif; // ascent_setup add_action( 'after_setup_theme', 'ascent_setup' ); /** * Register widgetized area and update sidebar with default widgets */ function ascent_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'ascent' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar Footer', 'ascent' ), 'id' => 'sidebar-footer', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'ascent_widgets_init' ); /** * Enqueue scripts and styles * */ function ascent_scripts() { $protocol = is_ssl() ? 'https' : 'http'; wp_enqueue_style('google-raleway', "$protocol://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"); // load bootstrap css wp_enqueue_style( 'ascent-bootstrap', get_template_directory_uri() . '/includes/resources/bootstrap/css/bootstrap.css' ); wp_enqueue_style( 'ascent-swipebox', get_template_directory_uri() . '/includes/css/swipebox.css' ); wp_enqueue_style( 'ascent-owl-carousel', get_template_directory_uri() . '/includes/css/owl.carousel.css' ); wp_enqueue_style( 'ascent-owl-theme', get_template_directory_uri() . '/includes/css/owl.theme.css' ); wp_enqueue_style( 'ascent-animations', get_template_directory_uri() . '/includes/css/animations.css' ); wp_enqueue_style( 'ascent-meanmenu', get_template_directory_uri() . '/includes/css/meanmenu.css' ); wp_enqueue_style( 'ascent-main', get_template_directory_uri() . '/includes/css/main.css' ); // load bootstrap js wp_enqueue_script('ascent-bootstrapjs', get_template_directory_uri().'/includes/resources/bootstrap/js/bootstrap.js', array('jquery') ); // load bootstrap wp js wp_enqueue_script( 'ascent-bootstrapwp', get_template_directory_uri() . '/includes/js/bootstrap-wp.js', array('jquery') ); wp_enqueue_script( 'ascent-skip-link-focus-fix', get_template_directory_uri() . '/includes/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'ascent-keyboard-image-navigation', get_template_directory_uri() . '/includes/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } wp_enqueue_script( 'ascent-smoothscroll', get_template_directory_uri() . '/includes/js/smoothscroll.js', array('jquery') ); wp_enqueue_script( 'ascent-swipebox', get_template_directory_uri() . '/includes/js/jquery.swipebox.js', array('jquery') ); wp_enqueue_script( 'ascent-owl-carousel', get_template_directory_uri() . '/includes/js/owl.carousel.js', array('jquery') ); wp_enqueue_script( 'ascent-appear', get_template_directory_uri() . '/includes/js/jquery.appear.js', array('jquery') ); wp_enqueue_script( 'ascent-meanmenu', get_template_directory_uri() . '/includes/js/jquery.meanmenu.js', array('jquery') ); wp_enqueue_script( 'ascent-velocity', get_template_directory_uri() . '/includes/js/jquery.velocity.js', array('jquery') ); wp_enqueue_script( 'ascent-appear-config', get_template_directory_uri() . '/includes/js/appear.config.js', array('jquery') ); // Theme main js wp_enqueue_script( 'ascent-themejs', get_template_directory_uri() . '/includes/js/main.js', array('jquery') ); } add_action( 'wp_enqueue_scripts', 'ascent_scripts' ); /** * Custom template tags for this theme. */ require get_template_directory() . '/includes/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/includes/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/includes/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/includes/jetpack.php'; /* Theme Social media icons */ if( !function_exists( 'ascent_socialmedia_navs' ) ){ function ascent_socialmedia_navs() { return array( 'twitter_url' => 'fa fa-twitter', 'facebook_url' => 'fa fa-facebook', 'google_url' => 'fa fa-google-plus', 'linkedin_url' => 'fa fa-linkedin', 'instagram_url' => 'fa fa-instagram', 'youtube_url' => 'fa fa-youtube', 'skype_username' => 'fa fa-skype', 'dribbble_url' => 'fa fa-dribbble', 'digg_url' => 'fa fa-digg', 'github_url' => 'fa fa-github', 'delicious_url' => 'fa fa-delicious', 'reddit_url' => 'fa fa-reddit', 'pinterest_url' => 'fa fa-pinterest', 'flickr_url' => 'fa fa-flickr', 'rss_url' => 'fa fa-rss' ); } } /* Theme Home Slider */ if( !function_exists( 'ascent_home_slider' ) ){ function ascent_home_slider() { return array( 'item_1' => array( 'image' => 'slider_image_1', 'description' => 'slider_description_1' ), 'item_2' => array( 'image' => 'slider_image_2', 'description' => 'slider_description_2' ), 'item_3' => array( 'image' => 'slider_image_3', 'description' => 'slider_description_3' ), 'item_4' => array( 'image' => 'slider_image_4', 'description' => 'slider_description_4' ), 'item_5' => array( 'image' => 'slider_image_5', 'description' => 'slider_description_5' ), ); } } if( !function_exists( 'ascent_theme_option_custom_style' ) ) { function ascent_theme_option_custom_style() { ?>