WordPressでは、JavaScriptファイルへのパスをテンプレートファイルに直接記入しなくても、wp_head()やwp_footer()から読み込むことができます。 読み込むことができますというか、そうしておかないとWordPressの公式テーマとしては登録できないようです。 wp_head()やwp ...
wp_enqueue_script( 'site-wide-javascript', '/wp-content/themes/genesis-sample/js/site.js', array( 'jquery' ) ); if ( is_front_page() && file_exists( $_SERVER ...
スクロールせずに見えるコンテンツであるヘッダーに関するスタイル指定をしたheader.cssのみをwp_headで読み込み、その他はフッターのwp_footer関数にて読み込むようになっています。 なお、wp_register_styleとwp_enqueue_styleについては下記の記事で書いていますので、よかったら読んでみてください。
Due to #491 the wc-gateway-ppec-smart-payment-buttons script no longer gets enqueued as part of the wp_enqueue_scripts hook, which means if theme developers are enqueuing JS that specifically depends ...