add_data( 'travel_notes-ie-only', 'conditional', 'lt IE 9' ); // add conditional wrapper around ie stylesheet wp_enqueue_script( 'travel_notes-js' , get_template_directory_uri() . '/library/js/scripts.js', array(), '', true ); } } /********************* THEME SUPPORT *********************/ // Adding WP 3+ Functions & Theme Support function travel_notes_theme_support() { // wp thumbnails (sizes handled in functions.php) add_theme_support( 'post-thumbnails' ); add_editor_style(); // default thumb size set_post_thumbnail_size(125, 125, true); // wp custom background (thx to @bransonwerner for update) add_theme_support( 'custom-background', array( 'default-image' => '', // background image default 'default-color' => 'fafafa', // background color default (dont add the #) 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ) ); // rss thingy add_theme_support('automatic-feed-links'); // to add header image support go here: http://themble.com/support/adding-header-background-image-support/ // adding post format support add_theme_support( 'post-formats', array( 'video', // video 'audio', 'quote' ) ); register_nav_menus( array( 'main-nav' => __( 'The Main Menu', 'travel-notes' ), // main nav in header /*'footer-links' => __( 'Footer Links', 'travel-notes' ) // secondary nav in footer*/ ) ); add_theme_support( 'title-tag' ); add_theme_support( 'custom-logo' ); } /* end travel_notes theme support */ if ( ! function_exists( '_wp_render_title_tag' ) ) : add_filter( 'wp_title', 'travel_notes_rw_title', 10, 3 ); function travel_notes_rw_title( $title, $sep, $seplocation ) { global $page, $paged; // Don't affect in feeds. if ( is_feed() ) return $title; // Add the blog's name if ( 'right' == $seplocation ): $title .= get_bloginfo( 'name' ); else: $title = get_bloginfo( 'name' ) . $title; endif; // 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}"; endif; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ): $title .= " {$sep} " . sprintf( __( 'Page %s', 'travel-notes' ), max( $paged, $page ) ); endif; return $title; } // end better title endif; /********************* RELATED POSTS FUNCTION *********************/ // Related Posts Function (call using travel_notes_related_posts(); ) function travel_notes_related_posts() { echo '