'Sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => 'Footer',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
function gazpo_pagination( $type = 'plain', $endsize = 1, $midsize = 1 ) {
global $wp_query, $wp_rewrite;
$wp_query->query_vars['paged'] > 1 ? $current = $wp_query->query_vars['paged'] : $current = 1;
if ( ! in_array( $type, array( 'plain', 'list', 'array' ) ) ) $type = 'plain';
$endsize = (int) $endsize;
$midsize = (int) $midsize;
$pagination = array(
'base' => @add_query_arg('paged','%#%'),
'format' => '',
'total' => $wp_query->max_num_pages,
'current' => $current,
'show_all' => false,
'end_size' => $endsize,
'mid_size' => $midsize,
'type' => $type,
'prev_text' => '←',
'next_text' => '→'
);
if( $wp_rewrite->using_permalinks() )
$pagination['base'] = user_trailingslashit( trailingslashit( remove_query_arg( 's', get_pagenum_link( 1 ) ) ) . 'page/%#%/', 'paged' );
if( !empty($wp_query->query_vars['s']) )
$pagination['add_args'] = array( 's' => get_query_var( 's' ) );
return paginate_links( $pagination );
}
function gazpo_wp_title( $old_title, $sep, $sep_location ) {
global $page, $paged;
$gazpo_title_text = $old_title . get_bloginfo( 'name' );
$sep = ' ' . $sep . ' ';
$site_tagline = get_bloginfo( 'description', 'display' );
if ( $site_tagline && ( is_home() || is_front_page() ) )
$gazpo_title_text .= "$sep$site_tagline";
if ( $paged >= 2 || $page >= 2 )
$gazpo_title_text .= $sep . sprintf( __( 'Page %s', 'silverorchid' ), max( $paged, $page ) );
return $gazpo_title_text;
}
add_filter( 'wp_title', 'gazpo_wp_title', 10, 3 );
function register_my_menus() {
register_nav_menus( array(
'header_menu' => __( 'Header Navigation', 'silverorchid' ),
) );
}
add_action( 'init', 'register_my_menus' );
//remove default RSS links from header
remove_action( 'wp_head', 'feed_links', 2 );
?>