= 2 || $page >= 2) $title = "$title $sep " . sprintf( __('Page %s', 'alphatrinity'), max($paged, $page)); return $title; } add_filter( 'wp_title', 'alphatrinity_wp_title', 10, 2); // load styles function alphatrinity_styles() { wp_enqueue_style('alphatrinity_style', get_stylesheet_uri()); } add_action('wp_enqueue_scripts', 'alphatrinity_styles'); // load javascript function alphatrinity_scripts() { if(!is_admin()){ wp_enqueue_script('jquery'); wp_enqueue_script('alphatrinity_scripts', get_template_directory_uri() . '/assets/scripts.js'); wp_enqueue_script('alphatrinity_masonry', get_template_directory_uri() . '/assets/masonry.pkgd.min.js'); wp_enqueue_script('alphatrinity_imgLoaded', get_template_directory_uri() . '/assets/imagesloaded.pkgd.min.js'); } if (is_singular()) wp_enqueue_script('comment-reply'); } add_action('wp_enqueue_scripts', 'alphatrinity_scripts'); // register widgets function alphatrinity_widgets_init() { register_sidebar(array( 'name' => __('Left Sidebar', 'alphatrinity'), 'id' => 'left-sidebar', 'description' => __('Widgets in this area will appear in the left hand sidebar on all pages and posts.', 'alphatrinity'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Right Sidebar', 'alphatrinity'), 'id' => 'right-sidebar', 'description' => __('Widgets in this area will appear in the right hand sidebar on posts and pages.', 'alphatrinity'), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

' )); } add_action('widgets_init', 'alphatrinity_widgets_init'); // add read more link to excerpts function alphatrinity_excerpt_more($more) { global $post; return '...

Read more →

'; } add_filter('excerpt_more', 'alphatrinity_excerpt_more'); // display page numbers in teaser pager if (!function_exists('alphatrinity_pagination')): function alphatrinity_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; // custom link rollover color function alphatrinity_register_theme_customizer($wp_customize) { $wp_customize->add_setting( 'alphatrinity_link_color', array( 'default' => '#ff3300', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array( 'label' => __('Link Rollover Color', 'alphatrinity'), 'section' => 'colors', 'settings' => 'alphatrinity_link_color' ) ) ); } add_action('customize_register', 'alphatrinity_register_theme_customizer'); // apply user defined link rollover color function alphatrinity_customizer_css() { ?>