Ошибка после создания нового поста
-
Добрый день. Делал сам тему с нуля, все работает, но одно но:
В админ панеле постоянно висит ошибка:
Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-includes/functions.php on line 6821 Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-admin/includes/misc.php on line 1310 Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-admin/admin-header.php on line 9
А при создании нового поста, появляется ошибка:
Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-includes/functions.php on line 6821 Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-admin/includes/misc.php on line 1310 Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-admin/post.php on line 231 Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-includes/pluggable.php on line 1355 Warning: Cannot modify header information - headers already sent by (output started at /home/s/domain/domain/public_html/wp-content/themes/drone/functions.php:1) in /home/s/domain/domain/public_html/wp-includes/pluggable.php on line 1358
Понимаю, что я где-то в файле functions.php накосячил, но не понимаю, где именно. Он выглядит следующим образом:
<?php function test_scripts(){ wp_enqueue_style('test-bootstrapcss', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css'); wp_enqueue_style('test-style', get_stylesheet_uri()); } add_action('wp_enqueue_scripts', 'test_scripts'); */ function drone_setup(){ add_theme_support('post-thumbnails'); register_nav_menus( array( 'header_menu' => 'Меню в шапке', 'footer_menu' => 'Меню в футере', ) ); } add_action( 'after_setup_theme', 'drone_setup' ); function test_widgets_init() { register_sidebar (array ( 'name' => 'Сайдбар справа', 'id' => 'side_menu', 'description' => 'Блок кнопок в описании услуги', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>\n",*/', 'before_title' => 'h5 class="widgettitile">', 'after_title' => '</h6>/n', )); } add_action('widgets_init', 'test_widgets_init');
В любом случае, даже есть файл оставить пустым, ничего не меняется. А если удалить — то ошибка уходит и все ок работает.
Я так понимаю, что я что-то очень важное не указал в файле, или не вызвал. Подскажите, что это может быть.
- Тема «Ошибка после создания нового поста» закрыта для новых ответов.