<?php wp_head(); ?>,<?php wp_footer(); ?>の記述はどこにすれば良いのか
Q&A
Closed
解決したいこと
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も初学者で、どのファイルを編集すればエラーが解消されるのか分からない状況です。
あまり理解していないですが、g2
とg3
ディレクトリ内のheader.php
とfooter.php
には<?php wp_head(); ?>
と<?php wp_footer(); ?>
が指定の箇所に記述されていました。
お力いただけると幸いです
0 likes