for posts and comments. add_theme_support( 'automatic-feed-links' ); // Enable support for Post Thumbnails, and declare two sizes. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 672, 372, true ); add_image_size( 'twentyfourteen-full-width', 1038, 576, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Top primary menu', 'twentyfourteen' ), 'secondary' => __( 'Secondary menu in left sidebar', 'twentyfourteen' ), ) ); /* * 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', ) ); } endif; // twentyfourteen_setup add_action( 'after_setup_theme', 'twentyfourteen_setup' ); /** * Enqueue scripts and styles for the front end. * @since Twenty Fourteen 1.0 * @return void */ function twentyfourteen_scripts() { // Load our main stylesheet. wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() ); // Load the Internet Explorer specific stylesheet. wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' ); wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131209', true ); } add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); /** * Extend the default WordPress body classes. * Adds body classes to denote: * 1. Single or multiple authors. * 2. Presence of header image. * 3. Index views. * 4. Full-width content layout. * 5. Presence of footer widgets. * 6. Single views. * 7. Featured content layout. * @since Twenty Fourteen 1.0 * @param array $classes A list of existing body class values. * @return array The filtered body class list. */ function twentyfourteen_body_classes( $classes ) { if ( is_multi_author() ) { $classes[] = 'group-blog'; } if ( is_archive() || is_search() || is_home() ) { $classes[] = 'list-view'; } if ( is_singular() && ! is_front_page() ) { $classes[] = 'singular'; } return $classes; } add_filter( 'body_class', 'twentyfourteen_body_classes' ); /** * Extend the default WordPress post classes. * Adds a post class to denote: * Non-password protected page with a post thumbnail. * @since Twenty Fourteen 1.0 * @param array $classes A list of existing post class values. * @return array The filtered post class list. */ function twentyfourteen_post_classes( $classes ) { if ( ! post_password_required() && has_post_thumbnail() ) { $classes[] = 'has-post-thumbnail'; } return $classes; } add_filter( 'post_class', 'twentyfourteen_post_classes' ); /** * Create a nicely formatted and more specific title element text for output * in head of document, based on current view. * @since Twenty Fourteen 1.0 * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. */ function twentyfourteen_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) { return $title; } // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title = "$title $sep $site_description"; } // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) { $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 ); function basic_template_scripts() { wp_deregister_script( 'jquery' ); // jQuery wp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js' ); wp_enqueue_script( 'jquery' ); wp_deregister_script( 'jquery-ui' ); // jQuery UI wp_register_script( 'jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', array( 'jquery' ) ); wp_enqueue_script( 'jquery-ui' ); wp_deregister_script( 'nivoslider' ); // nivoSlider wp_register_script( 'nivoslider', get_bloginfo('template_directory') . '/js/jquery.nivo.slider.pack.js', array( 'jquery' ) ); wp_enqueue_script( 'nivoslider' ); wp_deregister_script( 'climatecontrol-js' ); // Example wp_register_script( 'climatecontrol-js', get_bloginfo('template_directory') . '/js/climatecontrol.js', array( 'jquery' ) ); wp_enqueue_script( 'climatecontrol-js' ); wp_register_style('nivoslider-css', get_bloginfo('template_directory') . '/css/nivo-slider.css'); wp_enqueue_style('nivoslider-css'); } add_action('wp_enqueue_scripts', 'basic_template_scripts'); /* Limit string by words not characters */ function limit_words($string, $word_limit) { $words = explode(" ",$string); return implode(" ",array_splice($words,0,$word_limit)); } function remove_menus () { global $menu; $restricted = array(__('Links'), __('Comments')); end ($menu); while (prev($menu)){ $value = explode(' ',$menu[key($menu)][0]); if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);} } } add_action('admin_menu', 'remove_menus'); add_action("login_head", "my_login_head"); function my_login_head() { echo " "; } add_filter( 'login_headerurl', 'w4_login_headerurl'); function w4_login_headerurl(){ return home_url('/'); } function columns_one_third( $atts, $content = null ) { return '