__( 'WPlook Main Navigation', 'wplook' ),) ); } add_action( 'init', 'register_my_menus' ); wp_create_nav_menu( 'WPlook Main Menu', array( 'slug' => 'primary' ) ); } endif; if ( ! function_exists( 'wplook_header_style' ) ) : /** * Styles the header image and text displayed on the blog */ function wplook_header_style() { // If no custom options for text are set, let's bail // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value if ( HEADER_TEXTCOLOR == get_header_textcolor() ) return; // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * Referenced via add_custom_image_header() in wplook_setup(). */ function wplook_admin_header_style() { ?> Header admin panel. * Referenced via add_custom_image_header() in wplook_setup(). */ function wplook_admin_header_image() { ?>

onclick="return false;" href="">

>
'f3f3f3', 'default-image' => get_template_directory_uri() . '/images/bg.png', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback'=> '' ); add_theme_support( 'custom-background', $wplook_bg_defaults ); // Add support for custom header $wplook_ch_defaults = array( 'default-image' => '%s/images/headers/ipad.jpg', 'random-default' => true, 'width' => 960, 'height' => 200, 'flex-height' => true, 'flex-width' => true, 'header-text' => true, 'default-text-color' => '000000', 'uploads' => true, 'wp-head-callback' => 'wplook_header_style', 'admin-head-callback' => 'wplook_admin_header_style', 'admin-preview-callback'=> 'wplook_admin_header_image', ); add_theme_support( 'custom-header', $wplook_ch_defaults ); // default Post Thumbnail dimensions (cropped) set_post_thumbnail_size( 150, 100, true ); add_image_size( 'ch-images', 960, 200, true ); /** * Display navigation to next/previous pages when applicable */ function wplook_content_nav( $nav_id ) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : ?> '; wp_widget_rss_output(array( 'url' => 'http://feeds.feedburner.com/wplook', 'title' => 'wplook news', 'items' => 5, 'show_summary' => 1, 'show_author' => 0, 'show_date' => 0 )); echo ''; } function wplook_get_date() { the_time(get_option('date_format')); } function wplook_get_time() { the_time(get_option('time_format')); } function wplook_get_date_time() { the_time(get_option('date_format')); _e(' at ', 'wplook'); the_time(get_option('time_format'));} //sidebar function wpl_sidebar_add_custom_box() { add_meta_box('wpl_sidebar', 'Sidebars', 'wpl_sidebars_custom_box','page', 'side', 'high'); add_meta_box('wpl_sidebar', 'Sidebars', 'wpl_sidebars_custom_box','post', 'side', 'high'); } /* Use the admin_menu action to define the custom boxes */ add_action('admin_menu', 'wpl_sidebar_add_custom_box'); /* prints the custom field in the new custom post section */ function wpl_sidebars_custom_box() { //get post meta value global $post; $enable_sidebar = get_post_meta($post->ID,'wpl_enable_sidebar',true) ; ?>