'content', 'footer' => 'page', ) ); /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on Stitch, use a find and replace * to change 'stitch' to the name of your theme in all the template files */ load_theme_textdomain( 'stitch', get_template_directory() . '/languages' ); /** * Add default posts and comments RSS feed links to head */ add_theme_support( 'automatic-feed-links' ); /** * Add support for custom backgrounds */ $stitch_defaults = array( 'default-color' => 'f7f6f2', 'default-image' => get_template_directory_uri() . '/images/background2.jpg', ); add_theme_support( 'custom-background', $stitch_defaults ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'stitch' ), ) ); /** * Add support for the Aside Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'status' ) ); } endif; // stitch_setup add_action( 'after_setup_theme', 'stitch_setup' ); /* Filter to add author credit to Infinite Scroll footer */ function stitch_footer_credits( $credit ) { $credit = sprintf( __( '%3$s | Theme: %1$s by %2$s.', 'stitch' ), 'Stitch', 'Caroline Moore', 'Proudly powered by WordPress' ); return $credit; } add_filter( 'infinite_scroll_credit', 'stitch_footer_credits' ); /** * Register widgetized area and update sidebar with default widgets * * @since Stitch 1.0 */ function stitch_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'stitch' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'stitch_widgets_init' ); /** * Enqueue scripts and styles */ function stitch_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_style( 'stitch_fjalla' ); wp_enqueue_style( 'stitch_rufina' ); wp_enqueue_style( 'stitch_pacifico' ); wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } } add_action( 'wp_enqueue_scripts', 'stitch_scripts' ); function stitch_header_position() { if ( 'true' != get_theme_mod( 'header_position', 'true' ) ) return; ?>