'efedee',
'default-image' => get_template_directory_uri() . '/images/background.jpg',
) ) );
/**
* Thumbnail support
**/
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 590, 275, true ); // 590 pixels wide by 275 pixels tall, hard crop mode
add_image_size( 'following-post-thumbnails', 250, 200, true ); // 250 pixels wide by 200 pixels tall, hard crop mode
}
add_action( 'after_setup_theme', 'grisaille_setup_theme' );
/**
* Change Excerpt length
**/
function grisaille_new_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'grisaille_new_excerpt_length' );
/**
* Change excerpt [...] to something else
**/
function grisaille_new_excerpt_more( $more ) {
global $post;
return ' ...
Continue reading', 'grisaille' );
}
add_filter( 'excerpt_more', 'grisaille_new_excerpt_more' );
/**
* Enqueue style.css and Google Fonts
**/
function grisaille_enqueue_scripts_styles() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_style( 'grisaille-fonts', "https://fonts.googleapis.com/css?family=Marvel|Bevan" );
}
add_action( 'wp_enqueue_scripts', 'grisaille_enqueue_scripts_styles' );
/**
* Enqueue font style for the custom header admin page.
*/
function grisaille_admin_fonts( $hook_suffix ) {
if ( 'appearance_page_custom-header' != $hook_suffix )
return;
wp_enqueue_style( 'grisaille-fonts', "https://fonts.googleapis.com/css?family=Marvel|Bevan" );
}
add_action( 'admin_enqueue_scripts', 'grisaille_admin_fonts' );
/**
* checks if the visitor is browsing either a page or a post and adds the
* JavaScript required for threaded comments if they are
**/
function grisaille_queue_js() {
if ( !is_admin() ){
if ( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1 ) )
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'get_header', 'grisaille_queue_js' );
/**
* register_sidebar()
**/
function grisaille_register_sidebars() {
/* Register the 'primary' sidebar. */
register_sidebar(
array(
'id' => 'grisaillesidebar',
'name' => __( 'Primary Sidebar', 'grisaille' ),
'before_widget' => '