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 '' :
?>
id="li-comment-">