= 2 || $page >= 2)
$title = "$title $sep " . sprintf( __('Page %s', 'alphasource'), max($paged, $page));
return $title;
}
add_filter( 'wp_title', 'alphanexus_wp_title', 10, 2 );
// load styles
function alphasource_styles() {
wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro');
wp_enqueue_style('googleFonts');
wp_enqueue_style('style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'alphasource_styles');
// load javascript
function alphanexus_scripts() {
if(!is_admin()){
wp_enqueue_script('jquery');
wp_enqueue_script('scripts', get_template_directory_uri() . '/assets/scripts.js');
}
if (is_singular()) wp_enqueue_script('comment-reply');
}
add_action('wp_enqueue_scripts', 'alphanexus_scripts');
//register footer and sidebar widgets
function alphanexus_widgets_init() {
register_sidebar(array(
'name' => __('Right Sidebar', 'alphanexus'),
'id' => 'sidebar-widgets',
'description' => __('Widgets in this area will appear in the right hand sidebar on all pages and posts.', 'alphanexus'),
'before_widget' => '",
'before_title' => '
'
));
register_sidebar(array(
'name' => __('Footer Left', 'alphanexus'),
'id' => 'footer-left',
'description' => __('Widgets in this area will appear in the left column of the footer.', 'alphanexus'),
'before_widget' => '",
'before_title' => ''
));
register_sidebar(array(
'name' => __('Footer Middle', 'alphanexus'),
'id' => 'footer-middle',
'description' => __('Widgets in this area will appear in the middle column of the footer.', 'alphanexus'),
'before_widget' => '",
'before_title' => ''
));
register_sidebar(array(
'name' => __('Footer Right', 'alphanexus'),
'id' => 'footer-right',
'description' => __('Widgets in this area will appear in the right column of the footer.', 'alphanexus'),
'before_widget' => '",
'before_title' => ''
));
}
add_action('widgets_init', 'alphanexus_widgets_init');
// custom header image
$defaults = array(
'flex-width' => true,
'flex-height' => false,
'height' => 200,
'header-text' => false,
'default-image' => get_template_directory_uri() . '/img/header.jpg'
);
add_theme_support('custom-header', $defaults);
// modify except trimmed output
function alphanexus_excerpt_more($more) {
global $post;
return '...';
}
add_filter('excerpt_more', 'alphanexus_excerpt_more');
?>