true,
'flex-width' => true,
'header-text' => array( 'site-title', 'site-description' ),
));
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded
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(
'primary' => esc_html__( 'Primary', 'educa' ),
) );
/*
* 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 https://developer.wordpress.org/themes/functionality/post-formats/
*/
add_theme_support( 'post-formats', array(
'aside',
'image',
'video',
'quote',
'link',
) );
add_theme_support('woocommerce');
add_image_size( 'educa-fullwidth', '825', '350', true);
add_image_size( 'educa-home-thumb', '285', '230', true);
educa_set_theme_var();
add_filter('excerpt_more', 'educa_excerpt_more');
}
endif;
add_action( 'after_setup_theme', 'educa_setup' );
// Replaces the excerpt "more" text by a link
function educa_excerpt_more($more) {
return '...';
}
/**
* 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 educa_content_width() {
$GLOBALS['content_width'] = apply_filters( 'educa_content_width', 640 );
}
add_action( 'after_setup_theme', 'educa_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function educa_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'educa' ),
'id' => 'sidebar-widget-area',
'description' => __('Sidebar Widget Area', 'educa' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Widget Area', 'educa' ),
'id' => 'footer-widget-area',
'description' => __( 'footer widget area', 'educa' ),
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar( array(
'name' => __( 'CTA Widget Area', 'educa' ),
'id' => 'cta-widget-area',
'description' => __( 'CTA widget area', 'educa' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
add_action( 'widgets_init', 'educa_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function educa_scripts() {
wp_enqueue_style( 'educa-google-fonts-style', '//fonts.googleapis.com/css?family=Lato:400,300,500,600,700,800,900');
wp_enqueue_style( 'educa-font-awesome-style', get_template_directory_uri()."/css/font-awesome.min.css");
wp_enqueue_style( 'educa-bootstrap-style', get_template_directory_uri()."/css/bootstrap.min.css");
wp_enqueue_style( 'educa-animate-style', get_template_directory_uri()."/css/animate.min.css");
wp_enqueue_style( 'educa-photobox-style', get_template_directory_uri()."/css/photobox.css");
wp_enqueue_style( 'educa-swiper-style', get_template_directory_uri()."/css/swiper.min.css");
wp_enqueue_style( 'educa-style', get_stylesheet_uri() );
wp_enqueue_script( 'jquery' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); }
wp_enqueue_script( 'educa-bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20120206', true );
wp_enqueue_script( 'educa-isotope-script', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array('jquery'), '20120206', true );
wp_enqueue_script( 'educa-photobox-script', get_template_directory_uri() . '/js/jquery.photobox.js', array('jquery'), '20120206', true );
wp_enqueue_script( 'educa-swiper-script', get_template_directory_uri() . '/js/swiper.min.js', array('jquery'), '20120206', true );
wp_enqueue_script( 'educa-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
wp_enqueue_script( 'educa-wow-script', get_template_directory_uri() . '/js/wow.min.js', array('jquery'), '20120206', true );
wp_enqueue_script( 'educa-custom-script', get_template_directory_uri() . '/js/custom-script.js', array('jquery'), '20120206', true );
global $educa_theme_data;
if($educa_theme_data['hide_demo_slider'] && is_front_page()):
$custom_css = '
#masthead{
position: relative;
}
.menu_head .dropdown-menu {
background-color: rgba(51, 51, 51, 0.8);
}
';
wp_add_inline_style( 'educa-style', $custom_css );
endif;
}
add_action( 'wp_enqueue_scripts', 'educa_scripts' );
function educa_lt_ie_9_html5_fix () {
if( ! is_admin() ){
echo "\n".'';
echo "\n".''."\n";
}
}
add_action('wp_head', 'educa_lt_ie_9_html5_fix');
function educa_custmizer_style(){
wp_enqueue_style('educa-customizer-css', get_template_directory_uri().'/css/customizer-style.css');
}
add_action('customize_controls_print_styles','educa_custmizer_style');
require get_template_directory() . '/inc/themefarmer-customizer.php';
require get_template_directory() . '/inc/themefarmer-sanitize-cb.php';
require get_template_directory() . '/inc/themefarmer-variables.php';
require get_template_directory() . '/inc/themefarmer-walker.php';
require get_template_directory() . '/inc/themefarmer-functions.php';
require get_template_directory() . '/inc/themefarmer-breadcrumbs.php';
require get_template_directory() . '/comment-function.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';