Hallo,
kann jemand Fehler an dem folgenden Code erkennen?
<?php add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' )); ?>
Den Code habe ich von hier: http://schnipsel.davidhellmann.com/wordpress/jede…ate-zuweisen/10
Die Funktion funktioniert einwandfrei.Bekomme jedoch Fehlermeldungen bei an-abmelden und bei neue-Artikel-Erstellungen:
ZitatAlles anzeigenWarning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-login.php on line 354
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-login.php on line 366
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 720
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 721
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 722
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 723
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 724
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 725
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 728
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 729
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 730
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 731
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 734
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 735
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 736
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 737
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 897
Wenn ich Beiträge aktualisieren möchte erhalte ich folgende Meldung:
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/w00deec4/wp-content/themes/telegraph/functions.php:7) in /www/htdocs/w00deec4/wp-includes/pluggable.php on line 897