__( 'Primary Menu', 'impresa' ), ) ); // 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 impresa_add_editor_styles() { add_editor_style( 'custom-editor-style.css' ); } add_action( 'init', 'impresa_add_editor_styles' ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'impresa_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; // impresa_setup add_action( 'after_setup_theme', 'impresa_setup' ); /** * Register widgetized area and update sidebar with default widgets. */ function impresa_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'impresa' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); // Area footer 1, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'impresa' ), 'id' => 'first-footer-widget-area', 'description' => __( 'The first footer widget area', 'impresa' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); // Area footer 2, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'impresa' ), 'id' => 'second-footer-widget-area', 'description' => __( 'The second footer widget area', 'impresa' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); // Area footer 3, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'impresa' ), 'id' => 'third-footer-widget-area', 'description' => __( 'The third footer widget area', 'impresa' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); // Area footer 4, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Fourth Footer Widget Area', 'impresa' ), 'id' => 'fourth-footer-widget-area', 'description' => __( 'The fourth footer widget area', 'impresa' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'impresa_widgets_init' ); /** * Enqueue scripts and styles. */ function impresa_scripts() { wp_enqueue_style( 'impresa-style', get_stylesheet_uri() ); wp_enqueue_style( 'impresa-skeleton', get_template_directory_uri().'/css/skeleton.css' ); wp_enqueue_style( 'impresa-layout', get_template_directory_uri().'/css/layout.css' ); wp_enqueue_style( 'impresa-icon', get_template_directory_uri().'/inc/icon/style.css' ); wp_enqueue_script( 'impresa-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'impresa-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); wp_enqueue_style( 'impresa-google-arvo', '//fonts.googleapis.com/css?family=Arvo:400,400italic' ); wp_enqueue_style( 'impresa-google-opensams', '//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', 'impresa_scripts' ); function impresa_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. */ function impresa_favicon() { ?> '. __('Read more →' ,'impresa') . ''; } add_filter('excerpt_more', 'new_excerpt_more'); /* * Schema.org. */ function html_tag_schema() { $schema = 'http://schema.org/'; // Is single post if(is_single()) { $type = "Article"; } // Is author page elseif( is_author() ) { $type = 'ProfilePage'; } // Is search results page elseif( is_search() ) { $type = 'SearchResultsPage'; } else { $type = 'WebPage'; } echo 'itemscope="itemscope" itemtype="' . $schema . $type . '"'; } /* * 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', 'impresa_wrapper_start', 10); add_action('woocommerce_after_main_content', 'impresa_wrapper_end', 10); function impresa_wrapper_start() { echo '
'; } function impresa_wrapper_end() { echo '
'; } add_theme_support( 'woocommerce' );