esc_html__( 'Main Menu', 'head-blog' ), ) ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 300, 300, true ); add_image_size( 'head-blog-single', 1140, 641, true ); add_image_size( 'head-blog-thumbnail', 120, 90, true ); // Add Custom Background Support. $args = array( 'default-color' => 'ffffff', ); add_theme_support( 'custom-background', $args ); // Add theme support for Custom Header. $custom_header_defaults = array( 'width' => 2000, 'height' => 450, 'flex-width' => true, 'flex-height' => true, 'default-image' => esc_url( get_template_directory_uri() ) .'/img/bg.jpg', 'wp-head-callback' => 'head_blog_header_style', ); add_theme_support( 'custom-header', $custom_header_defaults ); add_theme_support( 'custom-logo', array( 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); } endif; /** * Set Content Width */ function head_blog_content_width() { $GLOBALS['content_width'] = apply_filters( 'head_blog_content_width', 1170 ); } add_action( 'after_setup_theme', 'head_blog_content_width', 0 ); if ( ! function_exists( 'head_blog_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see head_blog_custom_header_setup(). */ function head_blog_header_style() { $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. // get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value. if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?> urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } /** * Enqueue Styles (normal style.css and bootstrap.css) */ function head_blog_theme_stylesheets() { // Add custom fonts, used in the main stylesheet. wp_enqueue_style( 'head-blog-fonts', head_blog_fonts_url(), array(), null ); wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.7' ); // Theme stylesheet. wp_enqueue_style( 'head-blog-stylesheet', get_stylesheet_uri(), array('bootstrap'), '1.0.1' ); // Load Font Awesome css. wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.7.0' ); } add_action( 'wp_enqueue_scripts', 'head_blog_theme_stylesheets' ); /** * Register Bootstrap JS with jquery */ function head_blog_theme_js() { wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.7', true ); wp_enqueue_script( 'head-blog-theme-js', get_template_directory_uri() . '/js/customscript.js', array( 'jquery' ), '1.0.1', true ); } add_action( 'wp_enqueue_scripts', 'head_blog_theme_js' ); /** * Register Custom Navigation Walker include custom menu widget to use walkerclass */ require_once( trailingslashit( get_template_directory() ) . 'lib/wp_bootstrap_navwalker.php' ); /** * Widgets */ require_once( trailingslashit( get_template_directory() ) . 'includes/widgets.php' ); /** * Register Theme Info Page */ require_once( trailingslashit( get_template_directory() ) . 'lib/dashboard.php' ); /** * Register PRO notify */ require_once( trailingslashit( get_template_directory() ) . 'lib/customizer.php' ); /** * Register preview */ require_once( trailingslashit( get_template_directory() ) . 'lib/demo-preview.php' ); add_action( 'widgets_init', 'head_blog_widgets_init' ); /** * Register the Sidebar(s) */ function head_blog_widgets_init() { register_sidebar( array( 'name' => __( 'Section before content', 'head-blog' ), 'id' => 'head-blog-homepage-area', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Right Sidebar', 'head-blog' ), 'id' => 'head-blog-right-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Section', 'head-blog' ), 'id' => 'head-blog-footer-area', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } function head_blog_main_content_width_columns() { $columns = '12'; if ( is_active_sidebar( 'head-blog-right-sidebar' ) ) { $columns = $columns - 3; } echo absint( $columns ); } if ( !function_exists( 'head_blog_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function head_blog_entry_footer() { // Get Categories for posts. $categories_list = get_the_category_list( ' ' ); // Get Tags for posts. $tags_list = get_the_tag_list( '', ' ' ); // We don't want to output .entry-footer if it will be empty, so make sure its not. if ( $categories_list || $tags_list || get_edit_post_link() ) { echo '
'; if ( 'post' === get_post_type() ) { if ( $categories_list || $tags_list ) { // Make sure there's more than one category before displaying. if ( $categories_list ) { echo ''; } if ( $tags_list ) { echo ''; } } } edit_post_link(); echo '
'; } } endif; if ( !function_exists( 'head_blog_generate_construct_footer' ) ) : /** * Build footer */ add_action( 'head_blog_generate_footer', 'head_blog_generate_construct_footer' ); function head_blog_generate_construct_footer() { ?>
<?php the_title_attribute(); ?>
<?php the_title_attribute(); ?>