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' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'menu-1' => esc_html__( 'Primary', 'bitcoinee' ),
) );
/*
* 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( 'bitcoinee_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support( 'custom-logo', array(
'height' => 78,
'width' => 225,
'flex-width' => true,
'flex-height' => true,
) );
add_editor_style( array( '/css/editor-style.css' ) );
}
endif;
add_action( 'after_setup_theme', 'bitcoinee_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 bitcoinee_content_width() {
$GLOBALS['content_width'] = apply_filters( 'bitcoinee_content_width', 640 );
}
add_action( 'after_setup_theme', 'bitcoinee_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function bitcoinee_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'bitcoinee' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'bitcoinee' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Widgets', 'bitcoinee' ),
'id' => 'footer-widgets',
'description' => esc_html__( 'Add widgets here to display in footer area', 'bitcoinee' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'bitcoinee_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function bitcoinee_scripts() {
wp_enqueue_script( 'jquery' );
wp_enqueue_style( 'bitcoinee-style', get_stylesheet_uri() );
wp_enqueue_style( 'cryptofont', get_stylesheet_directory_uri() . '/css/cryptofont.min.css', array(), '0.1.1', 'all' );
wp_enqueue_style( 'googlefonts', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,700|Roboto:300,400,700|Oswald:400,700&subset=latin-ext' );
wp_enqueue_style( 'bootstrap4beta', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), '4.0.2', 'all' );
wp_enqueue_style( 'fontawesome', get_stylesheet_directory_uri() . '/css/font-awesome.min.css', '4.7.0', 'all' );
wp_enqueue_style( 'owlcarousel', get_stylesheet_directory_uri() . '/css/owl.carousel.min.css', rand(), 'all' );
wp_enqueue_style( 'owltheme', get_stylesheet_directory_uri() . '/css/owl.theme.default.min.css', rand(), 'all' );
wp_enqueue_style( 'animatecss', get_stylesheet_directory_uri() . '/css/animate.css', rand(), 'all' );
wp_enqueue_script( 'owlcarousel', get_template_directory_uri() . '/js/owl.carousel.min.js', array('jquery'), 201217, true );
wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20151215', true );
wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
wp_enqueue_script( 'bitcoinee-main', get_template_directory_uri() . '/js/main.js', array('jquery'), 1.0, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'bitcoinee_scripts' );
function bitcoinee_excerpt( $length ) {
if ( is_admin() ) {
return $length;
} else {
return 50;
}
}
add_filter( 'excerpt_length', 'bitcoinee_excerpt', 999 );
/**
* 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';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/template-functions.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
if ( defined( 'JETPACK__VERSION' ) ) {
require get_template_directory() . '/inc/jetpack.php';
}