for posts and comments. add_theme_support( 'automatic-feed-links' ); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'almanac' ) ); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support( 'custom-background', array( 'default-color' => 'f3f0ed', ) ); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support( 'post-thumbnails' ); add_image_size('mainthumb', 400, 200, true); } add_action( 'after_setup_theme', 'almanac_setup' ); /** * Enqueues scripts and styles for front-end. * * @since Twenty Twelve 1.0 */ function almanac_scripts_styles() { global $wp_styles; /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); /* * Adds JavaScript for handling the navigation menu hide-and-show behavior. */ wp_enqueue_script('jquery'); wp_enqueue_script( 'superfish-script', get_template_directory_uri() . '/js/superfish.js'); wp_enqueue_script( 'fancybox-script', get_template_directory_uri() . '/js/fancybox.js'); wp_enqueue_script( 'mobilemenu-script', get_template_directory_uri() . '/js/mobilemenu.js'); wp_enqueue_script( 'almanac-script', get_template_directory_uri() . '/js/almanacscripts.js'); /* * Loads our main stylesheet. */ wp_enqueue_style( 'almanac-style', get_stylesheet_uri()); } add_action( 'wp_enqueue_scripts', 'almanac_scripts_styles' ); /** * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link. * */ function almanac_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'almanac_page_menu_args' ); /** * Registers our main widget area and the front page widget areas. * */ function almanac_widgets_init() { register_sidebar( array( 'name' => __( 'Left Sidebar', 'almanac' ), 'id' => 'sidebar-1', 'description' => __( 'Appears in all posts and pages when not using the full width page template', 'almanac' ), 'before_widget' => '
', 'before_title' => '', '' ); ?>