I'm getting this error (I activated wp-debug) when I try to activate a theme or when I try to save a post:
Warning: Cannot modify header information - headers already sent by (output started at /mnt/webv/b3/13/56920413/htdocs/WordPress_02/wp-content/themes/BackpackFamily/functions.php:58) in /mnt/webv/b3/13/56920413/htdocs/WordPress_02/wp-admin/post.php on line 197
Warning: Cannot modify header information - headers already sent by (output started at /mnt/webv/b3/13/56920413/htdocs/WordPress_02/wp-content/themes/BackpackFamily/functions.php:58) in /mnt/webv/b3/13/56920413/htdocs/WordPress_02/wp-includes/pluggable.php on line 1171
That's the code of my functions.php, what did I do wrong?
<?php
// Navigation
if ( function_exists('register_nav_menus') ) {
register_nav_menus(array(
'main-navi' => __( 'Hauptnavigation' )
));
}
// Thumbnails
if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 200, 200, true );
// Read more Link
function new_excerpt_more($more) {
global $post;
return ' … </br><a href="'. get_permalink($post->ID) . '">' . 'Mehr lesen »' . '</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
// Sidebar
function sl_sidebar() {
$args = array(
'id' => 'default_sidebar',
'name' => __( 'Sidebar Header', 'text_domain' ),
'description' => __( 'Sidebar Header', 'text_domain' ),
'before_title' => '<h3><a href="#">',
'after_title' => '</a></h3>',
'before_widget' => '',
'after_widget' => '',
);
register_sidebar( $args );
}
add_action( 'widgets_init', 'sl_sidebar' );
// Search Button
add_filter('get_search_form', 'new_search_button');
function new_search_button($text) {
$text = str_replace('value="Suche"', 'value="Suchen"', $text);
return $text;
}
?>
Thanks for help!