1920, 'height' => 100, 'flex-width' => true, 'flex-height' => true, 'uploads' => true, 'header-text' => true, 'default-text-color' => 'fff', 'wp-head-callback' => 'blogger_header_style', ); add_theme_support( 'custom-header', $args ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // Styles the visual editor with editor-style.css add_editor_style(); // Styles for default background arguments $background_args = array ( 'default-color' => 'e3e3e3', 'default-image' => get_template_directory_uri() . '/images/background.jpg', ); add_theme_support( 'custom-background', $background_args ); // Register navigation menu register_nav_menus ( array( 'header-menu' => 'Main Menu' ) ); //set content width if ( ! isset( $content_width ) ) $content_width = 620; } // title filter function blogger_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 ( 2 <= $paged || 2 <= $page ) $title = "$title $sep " . sprintf( __( 'Page', 'blogger' ) . ' %s', max( $paged, $page ) ); return $title; } // Registers main widget area function blogger_register_widget() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'blogger' ), 'id' => 'sidebar-widgets', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } /*********************************** FOR SLIDER ****************/ //adding metabox for show post in slider function blogger_metabox_for_slider() { add_meta_box( 'blogger_metabox_id', __( 'Add to slider' , 'blogger' ), 'blogger_metabox_for_slider_callback', 'post', 'normal' ); } // add and save meta for post function blogger_save_post_meta_for_slider( $post_id ) { global $post, $post_id; // autosave meta for post if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return $post_id; elseif ( ! current_user_can( 'edit_post', $post_id ) ) { return $post_id; } // save meta for post if ( wp_is_post_revision( $post_id ) ) return $post_id; if ( $post != null ) { if ( ( isset ( $_POST['blogger_add_slide'] ) ) && ( $_POST['blogger_add_slide'] == 'on' ) ) { update_post_meta( $post->ID, 'blogger_add_slide', 'on' ); } else { update_post_meta( $post->ID, 'blogger_add_slide', 'off' ); } } } //customize metabox function blogger_metabox_for_slider_callback() { global $post; $screen = get_current_screen(); // Add form elements for metabox ?> ID, 'blogger_add_slide', true ) ) { ?> checked='checked' /> '; // tag before the current crumb $after = ''; // tag after the current crumb $text['home'] = __( 'Home', 'blogger' ); /* Link text "Home" */ $text['category'] = __( 'Category:', 'blogger' ) . ' %s'; /* Text for a category page */ $text['search'] = __( 'Results for:', 'blogger' ) . ' %s'; /* Text for the search results page */ $text['tag'] = __( 'Tags:', 'blogger' ) . ' %s'; /* Text for the tag page */ $text['author'] = __( 'Autors posts:', 'blogger' ) . ' %s'; /* Text for the autor page */ $text['404'] = __( 'Error 404', 'blogger' ); /* Text for the page 404 */ $home_link = home_url(); // code for generate breadcrumbs if ( is_home() || is_front_page() ) { if ( $show_on_home == 1 ) echo ''; } else { echo ''; } } // end blogger_breadcrumbs // Post caption for thumbnail function blogger_the_post_caption( $size = '', $attr = '' ) { global $post; $thumb_id = get_post_thumbnail_id( $post->ID ); $args = array( 'post_type' => 'attachment', 'post_status' => null, 'parent' => $post->ID, 'include' => $thumb_id, ); $thumbnail_image = get_posts( $args ); if ( $thumb_id && $thumbnail_image && isset( $thumbnail_image[0] ) ) { // Showing the thumbnail caption $caption = $thumbnail_image[0]->post_excerpt; if( $caption ) { $output = '

'; $output .= $caption; $output .= '

'; echo $output; }; }; } // Show pages navigation function blogger_page_nav() { if ( get_previous_posts_link() || get_next_posts_link() ) { // div for navigation ?>