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 http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 825, 510, true ); add_image_size('medium', 300, 300, true); add_image_size('large', 1038, 576, true); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'bloxz' ), ) ); /* * 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 http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat' ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'bloxz_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', bloxz_fonts_url() ) ); } endif; // bloxz_setup add_action( 'after_setup_theme', 'bloxz_setup' ); if ( ! function_exists( 'bloxz_fonts_url' ) ) : /** * Register Google fonts for BLOXZ. * * @since bloxz * * @return string Google fonts URL for the theme. */ function bloxz_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* translators: If there are characters in your language that are not supported by Noto Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'bloxz' ) ) { $fonts[] = 'Noto Sans:400italic,700italic,400,700'; } /* translators: If there are characters in your language that are not supported by Noto Serif, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'bloxz' ) ) { $fonts[] = 'Noto Serif:400italic,700italic,400,700'; } /* translators: If there are characters in your language that are not supported by Inconsolata, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'bloxz' ) ) { $fonts[] = 'Inconsolata:400,700'; } /* translators: To add an additional character subset specific to your language, translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'bloxz' ); if ( 'cyrillic' == $subset ) { $subsets .= ',cyrillic,cyrillic-ext'; } elseif ( 'greek' == $subset ) { $subsets .= ',greek,greek-ext'; } elseif ( 'devanagari' == $subset ) { $subsets .= ',devanagari'; } elseif ( 'vietnamese' == $subset ) { $subsets .= ',vietnamese'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), '//fonts.googleapis.com/css' ); } return $fonts_url; } endif; /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function bloxz_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar 1', 'bloxz' ), 'id' => 'sidebar-1', 'description' => 'These widgets will be shown on left side', 'before_widget' => '', 'before_title' => '
', ) ); register_sidebar( array( 'name' => __( 'Sidebar 2', 'bloxz' ), 'id' => 'sidebar-2', 'description' => 'These widgets will be shown on right side', 'before_widget' => '', 'before_title' => '', ) ); register_sidebar( array( 'name' => __( 'Footer Widgets', 'bloxz' ), 'id' => 'sidebar-3', 'description' => 'These widgets will be shown on footer', 'before_widget' => '', 'before_title' => '', ) ); } add_action( 'widgets_init', 'bloxz_widgets_init' ); function load_fonts() { wp_register_style('droid-sans', 'http://fonts.googleapis.com/css?family=Droid+Sans:400,700'); wp_enqueue_style('droid-sans'); } /** * Enqueue scripts and styles. */ function bloxz_scripts() { // add custom fonts for our main stylesheet wp_enqueue_style('bloxz-fonts', load_fonts(), array(), null); // load bootstrap v3.3.1 wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.1' ); // load fontawesome v4.2.0 wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.2.0' ); wp_enqueue_style( 'bloxz-style', get_stylesheet_uri() ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'masonry' ); wp_enqueue_script( 'modernizer', get_template_directory_uri() . '/js/modernizr.custom.js', array(), '20120206', true ); wp_enqueue_script( 'easing', get_template_directory_uri() . '/js/jquery.easing.min.js', array(), '20120206', true ); wp_enqueue_script( 'custom', get_template_directory_uri() . '/js/custom.js', array(), '20120206', true ); wp_enqueue_script( 'bloxz-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'bloxz-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'bloxz_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'; /** * Custom widget for Contact Information */ require get_template_directory() . '/inc/custom_widget/social-share.php';