920, 'height' => 100, 'textcolor' => 'ffffff', 'admin_header_callback' => 'lifestyle_admin_style' ) ); /** * Register a custom admin callback to display the custom header preview with the * same style as is shown on the front end. * */ function lifestyle_admin_style() { $headimg = sprintf( '.appearance_page_custom-header #headimg { background: url(%s) no-repeat; font-family: Georgia, Times, serif; min-height: %spx; text-align: center; text-shadow: #666 1px 1px; }', get_header_image(), HEADER_IMAGE_HEIGHT ); $h1 = sprintf( '#headimg h1, #headimg h1 a { color: #%s; font-size: 48px; font-variant: small-caps; font-weight: normal; line-height: 48px; margin: 35px 0 0; text-decoration: none; }', esc_html( get_header_textcolor() ) ); $desc = sprintf( '#headimg #desc { color: #%s; font-size: 20px; font-style: italic; line-height: 1; margin: 0; }', esc_html( get_header_textcolor() ) ); printf( '', $headimg, $h1, $desc ); } /** Register default header options */ register_default_headers( array( 'default' => array( 'url' => CHILD_URL . '/images/header.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-thumb.png' ), 'blue' => array( 'url' => CHILD_URL . '/images/header-blue.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-blue-thumb.png' ), 'charcoal' => array( 'url' => CHILD_URL . '/images/header-charcoal.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-charcoal-thumb.png' ), 'gray' => array( 'url' => CHILD_URL . '/images/header-gray.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-gray-thumb.png' ), 'green' => array( 'url' => CHILD_URL . '/images/header-green.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-green-thumb.png' ), 'pink' => array( 'url' => CHILD_URL . '/images/header-pink.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-pink-thumb.png' ), 'purple' => array( 'url' => CHILD_URL . '/images/header-purple.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-purple-thumb.png' ), 'tan' => array( 'url' => CHILD_URL . '/images/header-tan.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-tan-thumb.png' ), 'teal' => array( 'url' => CHILD_URL . '/images/header-teal.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-teal-thumb.png' ), 'yellow' => array( 'url' => CHILD_URL . '/images/header-yellow.png', 'thumbnail_url' => CHILD_URL . '/images/thumbs/header-yellow-thumb.png' ) ) ); /** Add support for post formats */ //add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) ); //add_theme_support( 'genesis-post-format-images' ); /** Remove elements for post formats */ add_action( 'genesis_before_post', 'lifestyle_remove_elements' ); function lifestyle_remove_elements() { if ( ! current_theme_supports( 'post-formats' ) ) return; // Remove if post has format if ( get_post_format() ) { remove_action( 'genesis_post_title', 'genesis_do_post_title' ); remove_action( 'genesis_before_post_content', 'genesis_post_info' ); remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); } // Add back, as post has no format else { add_action( 'genesis_post_title', 'genesis_do_post_title' ); add_action( 'genesis_before_post_content', 'genesis_post_info' ); add_action( 'genesis_after_post_content', 'genesis_post_meta' ); } } /** Add support for 6-column footer widgets */ add_theme_support( 'genesis-footer-widgets', 6 ); /** Reposition the primary navigation */ /** Change breadcrumb location */ remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' ); /** Add two sidebars underneath the primary sidebar */ add_action( 'genesis_after_sidebar_widget_area', 'lifestyle_bottom_sidebars' ); function lifestyle_bottom_sidebars() { foreach ( array( 'sidebar-bottom-left', 'sidebar-bottom-right' ) as $area ) { echo '
'; dynamic_sidebar( $area ); echo '
'; } } /** Register widget areas **/ genesis_register_sidebar( array( 'id' => 'sidebar-bottom-left', 'name' => __( 'Sidebar Bottom Left', 'lifestyle' ), 'description' => __( 'This is the bottom left sidebar.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'sidebar-bottom-right', 'name' => __( 'Sidebar Bottom Right', 'lifestyle' ), 'description' => __( 'This is the bottom right sidebar.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'home', 'name' => __( 'Home', 'lifestyle' ), 'description' => __( 'This is the homepage section.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'home-left', 'name' => __( 'Home Left', 'lifestyle' ), 'description' => __( 'This is the homepage left section.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'home-right', 'name' => __( 'Home Right', 'lifestyle' ), 'description' => __( 'This is the homepage right section.', 'lifestyle' ), ) ); genesis_register_sidebar( array( 'id' => 'portfolio', 'name' => __( 'Portfolio', 'lifestyle' ), 'description' => __( 'This is the portfolio page template', 'lifestyle' ), ) ); /** Customize the entire footer */ remove_action( 'genesis_footer', 'genesis_do_footer' ); add_action( 'genesis_footer', 'child_do_footer' ); function child_do_footer() { ?>

About Us — Copyright © 2013 GKS Guides Limited — All Rights Reserved — Privacy Policy

ID); if (!$already_has_thumb) { $attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); if ($attached_image) { foreach ($attached_image as $attachment_id => $attachment) { set_post_thumbnail($post->ID, $attachment_id); } } } } //end function add_action('the_post', 'autoset_featured'); add_action('save_post', 'autoset_featured'); add_action('draft_to_publish', 'autoset_featured'); add_action('new_to_publish', 'autoset_featured'); add_action('pending_to_publish', 'autoset_featured'); add_action('future_to_publish', 'autoset_featured');