for posts and comments. add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); // Adds support for a custom header image. add_theme_support( 'custom-header', array( // Text color and image (empty to use none). 'default-text-color' => '333333', 'default-image' => '', // Set height and width, with a maximum value for the width. 'height' => 128, 'width' => 960, 'max-width' => 960, // Support flexible height and width. 'flex-height' => true, 'flex-width' => false, // Random image rotation off by default. 'random-default' => false, // Callbacks for styling the header and the admin preview. 'wp-head-callback' => 'blogotron_header_style', 'admin-head-callback' => 'blogotron_admin_header_style', 'admin-preview-callback' => 'blogotron_admin_header_image', ) ); // This theme supports custom background color and image add_theme_support( 'custom-background', array( 'default-color' => 'f5f5f5', ) ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'main', __( 'Main Menu', 'blogotron' ) ); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support( 'post-thumbnails' ); add_image_size( 'post-featured-image', 528, 9999 ); // Unlimited height, soft crop // Adds support Shortcodes in sidebar widgets. add_filter( 'widget_text', 'do_shortcode' ); } // Registers main widget area area. function blogotron_sidebar() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'blogotron' ), 'id' => 'main-sidebar', 'description' => __( 'Widgets for the sidebar.', 'blogotron' ), 'before_widget' => '', 'before_title' => '
%s
', $thumbnail_image[0]->post_excerpt ); } } // Get attachment image, caption and metadata. function blogotron_the_attachment() { global $post; $attachment = wp_prepare_attachment_for_js( get_the_ID() ); ?> comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>