functions.phpの編集はサーバーサイドとワードプレスサイドで可能です。ワードプレスの方が簡単ですが、以前、ワードプレスサイドで編集した際に誤った関数を保存してしまい、ワードプレスサイドでの書き換えが不可能となってしまいました。
しかし、サーバーサイドの方ではいつでも修正可能です。使い慣れていないとどこから入ったら良いのか時間がかかってしまったので記録しておきます。
なお、functions.phpを変更する際はバックアップを取るなど慎重にご対応ください。
WordPress Simplicity 2 child テーマのfunctions.phpを編集する方法
サーバーサイドから編集する場合
エックスサーバー Xserver
1. エックスサーバーのインフォパネルにログインする
![](https://risumote.com/wp-content/uploads/2018/02/4.jpg)
2. ご契約一覧からサーバー→ファイルマネージャー→ログイン
![](https://risumote.com/wp-content/uploads/2018/02/6.jpg)
3. 編集したいドメインを選択しクリック
![](https://risumote.com/wp-content/uploads/2018/02/6-1.jpg)
(※functions.phpは文字コードをUTF-8で編集する)
![](https://risumote.com/wp-content/uploads/2018/02/1.2.jpg)
4. public_html をクリック
![](https://risumote.com/wp-content/uploads/2018/02/6-2.jpg)
5. その後、wp-content → themes の階層までクリックして進む
6. simplicity2-child(変更したいテーマを選択)を選択
![](https://risumote.com/wp-content/uploads/2018/02/7-1.jpg)
7. functions.php にチェックを入れ、編集をクリックする
![](https://risumote.com/wp-content/uploads/2018/02/8.jpg)
9. ファイルの編集で関数を追加する
![](https://risumote.com/wp-content/uploads/2018/02/9.jpg)
ロリポップ lolipop!
1. ロリポップのユーザー専用ページにログイン
2. サーバーの管理・設定→ロリポップ!FTP
3. wp-content → themes → simplicity2-childの階層へ進む
4. skins → functions.php
5. functions.phpを編集する
ワードプレス側で編集する場合
1. ダッシュボードの外観→テーマの編集
![](https://risumote.com/wp-content/uploads/2018/02/1-4.jpg)
2. 右側上部の編集するテーマを選択でSimplicity2 childを選び「選択」をクリック→function.php
(親テーマを編集する場合はSimplicity2を選択)
![](https://risumote.com/wp-content/uploads/2018/02/2-5.jpg)
3. 追加したい関数を記入しファイルを更新
![](https://risumote.com/wp-content/uploads/2018/02/3-2.jpg)