'ffffff',
'text' => '444444',
'link' => '2277dd',
'border' => 'cccccc',
'url' => '3371a3',
);
$content_width = 500;
add_theme_support( 'automatic-feed-links' );
add_custom_background();
// Sidebar registration for dynamic sidebars, one on the left or right depending on user layout selection, the other three in the footer.
if(function_exists('register_sidebar')) {
register_sidebar(array('before_widget' => '
','after_widget' => '
'));
}
register_sidebar( array(
'name' => __( 'Footer Area One', 'k2_domain' ),
'id' => 'sidebar-2',
'description' => __( 'An optional widget area for your site footer', 'k2_domain' ),
'before_widget' => '',
'after_widget' => "
",
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Area Two', 'k2_domain' ),
'id' => 'sidebar-3',
'description' => __( 'An optional widget area for your site footer', 'k2_domain' ),
'before_widget' => '',
'after_widget' => "
",
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Area Three', 'k2_domain' ),
'id' => 'sidebar-4',
'description' => __( 'An optional widget area for your site footer', 'k2_domain' ),
'before_widget' => '',
'after_widget' => "
",
'before_title' => '',
) );
/**
* Count the number of footer sidebars to enable dynamic classes for the footer
*/
function k2_footer_sidebar_class() {
$count = 0;
if ( is_active_sidebar( 'sidebar-2' ) )
$count++;
if ( is_active_sidebar( 'sidebar-3' ) )
$count++;
if ( is_active_sidebar( 'sidebar-4' ) )
$count++;
$class = '';
switch ( $count ) {
case '1':
$class = 'one';
break;
case '2':
$class = 'two';
break;
case '3':
$class = 'three';
break;
}
if ( $class )
echo 'class="' . $class . '"';
}
define('HEADER_TEXTCOLOR', 'ffffff');
define('HEADER_IMAGE', '%s/images/k2-header.png'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 780);
define('HEADER_IMAGE_HEIGHT', 200);
function k2_admin_header_style() {
?>
__( 'Primary Navigation' ),
) );
// Add a home link to the default menu fallback wp_page_menu
function k2_page_menu_args( $args ) {
$args['show_home'] = 'Blog';
$args['depth'] = 1;
return $args;
}
add_filter( 'wp_page_menu_args', 'k2_page_menu_args' );
// Add CLASS attribute of "menu" to the first occurence in wp_page_menu( )
function k2_add_menu_class( $menu ) {
return preg_replace( '/