@e-y

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

<?php wp_head(); ?>,<?php wp_footer(); ?>の記述はどこにすれば良いのか

解決したいこと

wordpressでプラグインを追加した際の<?php wp_head(); ?>,<?php wp_footer(); ?>を記述しなさいというエラーを解消したい。

wordpressでlightningのテーマを使用してHP作成を初めて行なっています。
その際、Social Media and Share Iconsのプラグインをインストールし、有効化したところ以下のようなエラーが表示されました。

エラー内容

Error : Please fix your theme to make plugins work correctly: Go to the Theme Editor and insert <?php wp_head(); ?> just before the </head> line of your theme's header.php file.
Error : Please fix your theme to make plugins work correctly: Go to the Theme Editor and insert <?php wp_footer(); ?> as the first line of your theme's footer.php file.

それぞれ<?php wp_head(); ?>,<?php wp_footer(); ?>を記述しなさいとのことだと思いますが、ファイルを開くと以下のような記述だけがされています。

テーマヘッダー header.php
<?php lightning_get_template_part( 'header' );?>
テーマフッター footer.php
<?php lightning_get_template_part( 'footer' );?>

それぞれ関数を呼び出してヘッダー、フッターを表示していることはなんとなく理解しているのですが、PHPもwordpressも初学者で、どのファイルを編集すればエラーが解消されるのか分からない状況です。

あまり理解していないですが、g2g3ディレクトリ内のheader.phpfooter.phpには<?php wp_head(); ?><?php wp_footer(); ?>が指定の箇所に記述されていました。

お力いただけると幸いです:bow:

0 likes

No Answers yet.

Your answer might help someone💌