tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for custom logo.
*/
add_theme_support( 'custom-logo' );
/*
* 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('business-era-blog', 575, 360, true);
// Register navigation menu locations.
register_nav_menus( array(
'primary' => esc_html__( 'Primary', 'business-era' ),
'social' => esc_html__( 'Social', 'business-era' ),
) );
/*
* 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',
) );
// Set up the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'business_era_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}
endif;
add_action( 'after_setup_theme', 'business_era_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 business_era_content_width() {
$GLOBALS['content_width'] = apply_filters( 'business_era_content_width', 770 );
}
add_action( 'after_setup_theme', 'business_era_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function business_era_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'business-era' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here to appear in Sidebar.', 'business-era' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => esc_html__( 'Home Page Widget Area', 'business-era' ),
'id' => 'home-page-widget-area',
'description' => esc_html__( 'Add widgets here to appear in Home Page Widget Area.', 'business-era' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => sprintf( esc_html__( 'Footer %d', 'business-era' ), 1 ),
'id' => 'footer-1',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => sprintf( esc_html__( 'Footer %d', 'business-era' ), 2 ),
'id' => 'footer-2',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => sprintf( esc_html__( 'Footer %d', 'business-era' ), 3 ),
'id' => 'footer-3',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => sprintf( esc_html__( 'Footer %d', 'business-era' ), 4 ),
'id' => 'footer-4',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'business_era_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function business_era_scripts() {
wp_enqueue_style( 'business-era-fonts', business_era_fonts_url(), array(), null );
wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/third-party/font-awesome/css/font-awesome.min.css', '', '4.7.0' );
wp_enqueue_style( 'mean-menu', get_template_directory_uri() . '/third-party/mean-menu/css/meanmenu.min.css', '', '2.0.7' );
wp_enqueue_style( 'business-era-style', get_stylesheet_uri() );
wp_enqueue_script( 'jquery-cycle2', get_template_directory_uri() . '/third-party/cycle2/js/jquery.cycle2.min.js', array( 'jquery' ), '2.1.6', true );
wp_enqueue_script( 'business-era-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
wp_enqueue_script( 'business-era-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
wp_enqueue_script( 'mean-menu', get_template_directory_uri() . '/third-party/mean-menu/js/jquery.meanmenu.min.js', array( 'jquery' ), '2.0.8', true );
wp_enqueue_script( 'business-era-custom', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0.5', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'business_era_scripts' );
// Load main file.
require_once trailingslashit( get_template_directory() ) . '/includes/main.php';