for posts and comments. add_theme_support( 'automatic-feed-links' ); add_theme_support( "title-tag" ); add_theme_support( "custom-header", $args ); add_theme_support( "custom-background", $args ) ; // Enable support for Post Thumbnails, and declare two sizes. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 630, 0, true ); add_image_size( 'alovernat-full-width', 930, 0, true ); // This theme uses wp_nav_menu(). register_nav_menus( array( 'primary' => __( 'Top primary menu', 'alovernat' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); global $content_width; if ( ! isset( $content_width ) ) { $content_width = 630; } } endif; // alovernat_setup add_action( 'after_setup_theme', 'alovernat_setup' ); /** * Register the Alovernat widget areas. * * @since Alovernat 1.0 */ function alovernat_widgets_init() { require get_template_directory() . '/inc/widgets.php'; register_widget( 'Alovernat_Ephemera_Widget' ); register_sidebar( array( 'name' => __( 'Primary Sidebar', 'alovernat' ), 'id' => 'sidebar-1', 'description' => __( 'Main sidebar that appears on the right.', 'alovernat' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'alovernat_widgets_init' ); /** * Register Lato Google font for Cosmet. * * @since Cosmet 1.0 * * @return string */ function alovernat_font_url() { $font_url = ''; /* * Translators: If there are characters in your language that are not supported * by Lato, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Lato font: on or off', 'alovernat' ) ) { $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" ); } return $font_url; } /** * Enqueue scripts and styles for the front end. * * @since Cosmet 1.0 */ function alovernat_scripts() { // Add Lato font, used in the main stylesheet. wp_enqueue_style( 'alovernat-lato', alovernat_font_url(), array(), null ); // Add Genericons font, used in the main stylesheet. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.0.2' ); // Load our main stylesheet. wp_enqueue_style( 'alovernat-style', get_stylesheet_uri(), array( 'genericons' ) ); // Load the Internet Explorer specific stylesheet. wp_enqueue_style( 'alovernat-ie', get_template_directory_uri() . '/css/ie.css', array( 'alovernat-style', 'genericons' ), '20131205' ); wp_style_add_data( 'alovernat-ie', 'conditional', 'lt IE 9' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script( 'alovernat-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140319', true ); wp_enqueue_script('alovernat-jquery', get_template_directory_uri(). '/js/custom-script.js',array(),'1.4.2',true); wp_enqueue_script('alovernat-easing', get_template_directory_uri(). '/js/jquery.easing-sooper.js',array(),'',true); wp_enqueue_script('alovernat-sooperfish', get_template_directory_uri(). '/js/jquery.sooperfish.js',array(),'0.1',true); wp_enqueue_script('alovernat-modernizr', get_template_directory_uri(). '/js/modernizr-1.5.min.js',array(),'',true); wp_enqueue_style( 'alovernat-fonts', get_template_directory_uri() . '/css/fonts.css' ); wp_enqueue_style('family','//fonts.googleapis.com/css?family=Lobster|Playball|Oswald'); } add_action( 'wp_enqueue_scripts', 'alovernat_scripts' ); if ( ! function_exists( 'alovernat_list_authors' ) ) : /** * Print a list of all site contributors who published at least one post. * * @since Alovernat 1.0 */ function alovernat_list_authors() { $contributor_ids = get_users( array( 'fields' => 'ID', 'orderby' => 'post_count', 'order' => 'DESC', 'who' => 'authors', ) ); foreach ( $contributor_ids as $contributor_id ) : $post_count = count_user_posts( $contributor_id ); // Move on if user has not published a post (yet). if ( ! $post_count ) { continue; } ?>
= 2 || $page >= 2 ) && ! is_404() ) { $title = "$title $sep " . sprintf( __( 'Page %s', 'alovernat' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'alovernat_wp_title', 10, 2 ); // Custom template tags for this theme. require get_template_directory() . '/inc/template-tags.php'; // Add Theme Customizer functionality. require get_template_directory() . '/inc/customizer.php';