__( 'Primary Menu', 'bootstraptheme' ),
) );
// Enable support for Post Formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'bootstraptheme_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}
endif; // bootstraptheme_setup
add_action( 'after_setup_theme', 'bootstraptheme_setup' );
/**
* Register widgetized area and update sidebar with default widgets.
*/
function bootstraptheme_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'bootstraptheme' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
}
add_action( 'widgets_init', 'bootstraptheme_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function bootstraptheme_scripts() {
wp_enqueue_style( 'bootstraptheme-style', get_stylesheet_uri() );
wp_enqueue_script( 'bootstraptheme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'bootstraptheme-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', 'bootstraptheme_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';
/*
* Cool Navbar
*/
require_once('wp_bootstrap_navwalker.php');
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'BootstrapTheme' ),
) );
/*
* Add theme options
*/
add_action( 'admin_menu', 'BootstrapthemeMenu' );
function BootstrapthemeMenu(){
add_theme_page( 'Bootstrap Theme Options', 'Bootstrap Theme Options', 'administrator', 'custompage', 'bootstraptheme_page',get_bloginfo('template_url').'/img/logo.png', 6 );
add_action( 'admin_init', 'register_mysettings' );
}
function show_carousel(){
$link1 = get_option('carousel1-link');
$link2 = get_option('carousel2-link');
$link3 = get_option('carousel3-link');
if((empty($link1))==true && (empty($link2))==true && (empty($link3))==true){
return false;
}else{
return true;
}
}
add_theme_support( 'post-thumbnails' );