'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' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); } add_action( 'widgets_init', 'grisaille_register_sidebars' ); /** * Load the Theme Options Page for social media icons */ require_once ( get_template_directory() . '/inc/theme-options.php' ); /** * Filters wp_title to print a neat tag based on what is being viewed. * * @since Grisaille 1.3.1 */ function grisaille_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // 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 ) $title .= " $sep " . sprintf( __( 'Page %s', 'grisaille' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'grisaille_wp_title', 10, 2 ); /** * Implement the Custom Header feature */ require( get_template_directory() . '/inc/custom-header.php' );