wp_head();
コードはサーバー側で実行する必要があるため、PHPを使用して呼び出す直前にこのコードを追加する必要があります。コードをmyにフックしてwp_head();
も機能しません。直前に追加する必要があります。追加するPHPコードは次のとおりです。
gravity_form_enqueue_scripts(1,true);
コードを挿入する必要がある場所は次のとおりです。
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
gravity_form_enqueue_scripts(1,true);
wp_head(); ?>
ブラウザに戻ったときにコードが表示されないようにする必要があります。このPHPスニペットをこの正確な場所に動的に追加するにはどうすればよいですか?