true, 'width' => 600, 'flex-height' => true, 'height' => 225, 'default-image' => get_template_directory_uri() . '/images/logo.png', ); add_theme_support( 'custom-header', $args ); //Add menu support function register_my_menu() { register_nav_menu('header-menu',__( 'Primary Menu' )); } add_action( 'init', 'register_my_menu' ); //Right sidebar enable /** Had to add this to follow wp theme code standard */ function theme_slug_widgets_init() { register_sidebar( array( 'name' => __( 'Right Sidebar', 'aakrosh'), 'id' => 'theme_right_section', 'description' => __( 'Sidebar appears here', 'aakrosh' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'theme_slug_widgets_init' ); // Custom excerpt length function custom_excerpt_length( $length ) { return 50; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); // Filter [...] for excerpt and add read more link function new_excerpt_more( $more ) { return ' ' . __(' [read More...]', 'aakrosh') . ''; } add_filter( 'excerpt_more', 'new_excerpt_more' ); if ( ! isset( $content_width ) ) { $content_width = 600; } $defaults = array( 'before' => '

' . __( 'Pages:', 'aakrosh'), 'after' => '

', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => ' ', 'nextpagelink' => __( 'Next page', 'aakrosh'), 'previouspagelink' => __( 'Previous page', 'aakrosh'), 'pagelink' => '%', 'echo' => 1 ); wp_link_pages( $defaults ); function custom_theme_setup() { add_theme_support('automatic-feed-links'); } add_action( 'after_setup_theme', 'custom_theme_setup' ); if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150, true ); // default Post Thumbnail dimensions (cropped) // additional image sizes // delete the next line if you do not need additional image sizes add_image_size( 'category-thumb', 300, 9999 ); //300 pixels wide (and unlimited height) } /** * Filters wp_title to print a neat tag based on what is being viewed. * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. */ function theme_name_wp_title( $title, $sep ) { if ( is_feed() ) { return $title; } global $page, $paged; // Add the blog name $title .= get_bloginfo( 'name', 'display' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title .= " $sep $site_description"; } // Add a page number if necessary: if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $title .= " $sep " . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'theme_name_wp_title', 10, 2 ); /* following code is taken from TwentyTen wp theme to keep it wp codex standard */ if ( ! function_exists( 'aakrosh_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own aakrosh_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * * @param object $comment The comment object. * @param array $args An array of arguments. @see get_comment_reply_link() * @param int $depth The depth of the comment. */ function aakrosh_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '' : ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <div id="comment-<?php comment_ID(); ?>"> <div class="comment-author vcard"> <?php echo get_avatar( $comment, 40 ); ?> <?php printf( __( '%s <span class="says">says:</span>', 'aakrosh' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?> </div><!-- .comment-author .vcard --> <?php if ( $comment->comment_approved == '0' ) : ?> <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'aakrosh' ); ?></em> <br /> <?php endif; ?> <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> <?php /* translators: 1: date, 2: time */ printf( __( '%1$s at %2$s', 'aakrosh' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'aakrosh' ), ' ' ); ?> </div><!-- .comment-meta .commentmetadata --> <div class="comment-body"><?php comment_text(); ?></div> <div class="reply"> <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> </div><!-- .reply --> </div><!-- #comment-## --> <?php break; case 'pingback' : case 'trackback' : ?> <li class="post pingback"> <p><?php _e( 'Pingback:', 'aakrosh' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'aakrosh' ), ' ' ); ?></p> <?php break; endswitch; } endif; ?>