__( 'Primary Menu', 'base' ),
) );
// Enable support for Post Formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
// Allows theme developers to link a custom stylesheet file to the TinyMCE visual editor.
function base_add_editor_styles() {
add_editor_style( 'custom-editor-style.css' );
}
add_action( 'init', 'base_add_editor_styles' );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'base_custom_background_args', array(
'default-color' => 'f9f9f9',
'default-image' => '',
) ) );
// Enable support for HTML5 markup.
add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) );
}
endif; // base_setup
add_action( 'after_setup_theme', 'base_setup' );
/**
* Register widgetized area and update sidebar with default widgets.
*/
function base_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'base' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
// Area footer 1, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'First Footer Widget Area', 'base' ),
'id' => 'first-footer-widget-area',
'description' => __( 'The first footer widget area', 'base' ),
'before_widget' => '',
'before_title' => '',
) );
// Area footer 2, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'Second Footer Widget Area', 'base' ),
'id' => 'second-footer-widget-area',
'description' => __( 'The second footer widget area', 'base' ),
'before_widget' => '',
'before_title' => '',
) );
// Area footer 3, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'Third Footer Widget Area', 'base' ),
'id' => 'third-footer-widget-area',
'description' => __( 'The third footer widget area', 'base' ),
'before_widget' => '',
'before_title' => '',
) );
// Area footer 4, located in the footer. Empty by default.
register_sidebar( array(
'name' => __( 'Fourth Footer Widget Area', 'base' ),
'id' => 'fourth-footer-widget-area',
'description' => __( 'The fourth footer widget area', 'base' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'base_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function base_scripts() {
wp_enqueue_style( 'base-style', get_stylesheet_uri() );
wp_enqueue_style( 'skeleton', get_template_directory_uri().'/css/skeleton.css' );
wp_enqueue_style( 'layout', get_template_directory_uri().'/css/layout.css' );
wp_enqueue_script( 'base-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'base-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
wp_enqueue_style( 'google-arvo', 'http://fonts.googleapis.com/css?family=Arvo:400,400italic' );
wp_enqueue_style( 'google-opensams', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,700,300' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'base_scripts' );
function base_wp_head(){
?>
';
if (!is_front_page()) {
echo '';
echo 'Home';
echo " » ";
if (is_category() || is_single()) {
the_category(' » ');
if (is_single()) {
echo " » ";
the_title();
}
} elseif (is_page()) {
echo the_title();
}
}
echo '';
}
/*
* Add favicon.
*/
if ( of_get_option('favicon_uploader')) {
function base_favicon() { ?>
'. __('Read more →' ,'base') . '';
}
add_filter('excerpt_more', 'new_excerpt_more');
/*
* Woocommerce support.
*/
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'base_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'base_wrapper_end', 10);
function base_wrapper_start() {
echo '';
}
function base_wrapper_end() {
echo '';
}
add_theme_support( 'woocommerce' );