警告の訳を出してもたぶん解決につながらないと思いますので、
まず 問題解決のためのチェックリストにもあるように、そのエラーが出た情報を一緒に投稿してください。
その方が解決が早いと思いますし、同じことで困っている人が検索したときの参考にもなります。
WordPressのログイン画面に、常に以下の2つのメッセージが表示されます。
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-login.php on line 384
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-login.php on line 396
そのままログインをすると、ログイン後の画面に、以下のメッセージが表示されます。
そしてこの状態から何もできない状況です。
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-login.php on line 384
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-login.php on line 396
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-includes/pluggable.php on line 678
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-includes/pluggable.php on line 679
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-includes/pluggable.php on line 680
Warning: Cannot modify header information – headers already sent by (output started at /home/~~/wp-content/themes/pacific/functions.php:1) in /home/~~/wp-includes/pluggable.php on line 875
そこで、functions.phpの全体をそっくり書き直しても、解決されません。
このような場合には、他に何を確認したらよいでしょうか。
よろしくお願いします。
fuctions.phpがBOM付きになってるか1行目に空行
jim912さん
なんとかBOMなしのphpファイルを作成することができ、問題解決できました。
ありがとうございました。
今後同じ現象が起きた方へ、BOMなしのphpファイルをきちんと作成してみることが解決の近道であると思います。
同時に、サイトで検索をすると、BOMなしのphpファイルであっても解決できないケースもあるようですので、まずBOMなしを対応して、それでも駄目な場合には、別の問題点を探されるのがよいと思います。