【WordPress】functions.phpを空ファイルで作るときの注意点

wordpress Web制作

自作テーマ(テンプレート)を作成する際、functions.phpになにも記載しない場合の書き方は、

<?php

の後に、改行が必要です。

上記のせいで、

( ! ) Parse error: syntax error, unexpected end of file in C:\Users\xxxx\Local Sites\wordpress\app\public\wp-content\themes\abc\functions.php on line 1

のエラーが発生しました。

コメント

タイトルとURLをコピーしました