= 2 || $page >= 2) $title = "$title $sep " . sprintf( __('Page %s', 'alphaquintrex'), max($paged, $page)); return $title; } add_filter('wp_title', 'alphaquintrex_wp_title', 10, 2); // load styles function alphaquintrex_styles() { wp_register_style('alphaquintrex_roboto', 'http://fonts.googleapis.com/css?family=Roboto+Slab:300,400,700'); wp_enqueue_style('alphaquintrex_bootstrapCSS', get_template_directory_uri() . '/assets/bootstrap.min.css'); wp_enqueue_style('alphaquintrex_style', get_stylesheet_uri()); wp_enqueue_style('alphaquintrex_roboto'); } add_action('wp_enqueue_scripts', 'alphaquintrex_styles'); function alphaquintrex_add_editor_styles() { $font_url = 'http://fonts.googleapis.com/css?family=Roboto+Slab:300,400,700'; add_editor_style( str_replace( ',', '%2C', $font_url ) ); } add_action( 'init', 'alphaquintrex_add_editor_styles' ); // load javascript function alphaquintrex_scripts() { if(!is_admin()){ wp_enqueue_script('jquery'); wp_enqueue_script('alphaquintrex_bootstrapJS', get_template_directory_uri() . '/assets/bootstrap.min.js'); wp_enqueue_script('alphaquintrex_scripts', get_template_directory_uri() . '/assets/scripts.js'); } if (is_singular()) wp_enqueue_script('comment-reply'); } add_action('wp_enqueue_scripts', 'alphaquintrex_scripts'); // register widgets function alphaquintrex_widgets_init() { register_sidebar(array( 'name' => __('Right Sidebar', 'alphaquintrex'), 'id' => 'right-sidebar', 'description' => __('Widgets in this area will appear in the right hand sidebar on all pages and posts.', 'alphaquintrex'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer Left', 'alphaquintrex'), 'id' => 'footer-left', 'description' => __('Widgets in this area will appear in the left column of the footer on all pages and posts.', 'alphaquintrex'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer Center', 'alphaquintrex'), 'id' => 'footer-center', 'description' => __('Widgets in this area will appear in the center column of the footer on all pages and posts.', 'alphaquintrex'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer Right', 'alphaquintrex'), 'id' => 'footer-right', 'description' => __('Widgets in this area will appear in the right column of the footer on all pages and posts.', 'alphaquintrex'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

' )); } add_action('widgets_init', 'alphaquintrex_widgets_init'); // pagination for last loop in index.php if (!function_exists('alphaquintrex_pagination')) : function alphaquintrex_pagination() { global $wp_query; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link($big))), 'format' => '?paged=%#%', 'current' => max(1, get_query_var('paged')), 'total' => $wp_query->max_num_pages )); } endif; ?>