= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'bloger' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'bloger_wp_title', 10, 2 ); add_theme_support( 'title-tag' ); /* ---------------------------------------------------------------------------- Register Primary Menu ----------------------------------------------------------------------------*/ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'THEMENAME' ), ) ); /* ---------------------------------------------------------------------------- Adding thumbnail support ----------------------------------------------------------------------------*/ if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } /* ---------------------------------------------------------------------------- Adding read more ----------------------------------------------------------------------------*/ function bloger_excerpt_more( $more ) { return ' Read More'; } add_filter( 'excerpt_more', 'bloger_excerpt_more' ); /*---------------------------------------------------------------------------- Register Sidebar ----------------------------------------------------------------------------*/ function bloger_widgets_init() { register_sidebar( array( 'name' =>__( 'Primary Sidebar', 'bloger'), 'id' => 'sidebar-1', 'description' => __( 'Appears on the static left page template', 'bloger' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'bloger_widgets_init' ); /*------------------------------------------------------------------------------------------------------- add theme support : search form, custom search form & theme support automatic feeds --------------------------------------------------------------------------------------------------------*/ add_theme_support( 'html5', array( 'search-form' ) ); function bloger_search_widget( $html ) { ob_start(); ?>

'
' . ' ' . '
', 'email' => '
' . '
', 'url' => '
' . '
', ); return $fields; } add_filter( 'comment_form_defaults', 'bloger_comment_form' ); function bloger_comment_form( $args ) { $args['comment_field'] = '
'; return $args; } add_action('comment_form', 'bloger_comment_button' ); function bloger_comment_button() { echo ''; } add_filter('get_avatar','change_avatar_css'); function change_avatar_css($class) { $class = str_replace("class='avatar", "class='img-circle img-thumbnail ", $class) ; return $class; } /*---------------------------------------------------------------------------- comment reply & content width ----------------------------------------------------------------------------*/ if ( is_singular() ) wp_enqueue_script( "comment-reply" ); if ( ! isset( $content_width ) ) $content_width = 900; /* -------------------------------------------------------------- Numeric Pagination -------------------------------------------------------------- */ function bloger_pagination($paged , $max) { $return = ''; return $return; } /* -------------------------------------------------------------- Fix Blog Pagination Links -------------------------------------------------------------- */ function posts_link_prev_class($format) { $format = str_replace('href=', 'class="next" href=', $format); return $format; } add_filter('next_posts_link', 'posts_link_prev_class'); $blog_limit = isset($bloger_options['limit_posts']) ? $bloger_options['limit_posts'] : 5; update_option('posts_per_page' , $blog_limit); /*---------------------------------------------------------------------------- Load jQuery Bootstrap ----------------------------------------------------------------------------*/ function bloger_bootstrap_scripts_jquery() { // Register the script like this for a theme: wp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) ); } add_action( 'wp_footer', 'bloger_bootstrap_scripts_jquery' ); // add ie conditional html5 shim to header function add_ie_html5_shim () { echo ''; echo ''; echo ''; } add_action('wp_head', 'add_ie_html5_shim');