WordPress
初めて完全なデザインを構築し、スタイルシートとスクリプト ファイルを読み込もうとしていますが、場所のテキスト出力しか得られないようです。
私が持っているものは以下です..
wp_enqueue_style('reset', bloginfo('template_url') . '/reset.css');
wp_enqueue_style('style', bloginfo('stylesheet_url'), array('reset'));
wp_enqueue_style('rhino', bloginfo('template_url') . '/rhinoslider-1.05.css', array('reset','style'));
これをタグなどに入れる必要がありlink
ますか?私はそれがすべてそれ自体で行うと思っていました。それ自体を行わない場合、そのようにロードするポイントは何ですか?同じファイルが2回または何か含まれていないことを確認していますが、リンクタグを自分で含める必要があり、WPがファイルを含めないことを決定した場合、空白のリンクタグが残ります!?
最後に、ハンドルを介して呼び出すことができるように、これらを事前に設定する必要がありますか? もしそうなら、どこですか?functions.php?
編集:functions.php
テーマファイルに以下を入れてみましたが、同じ結果が得られました。
add_action( 'after_setup_theme', 'mmw_new_theme_setup' );
function mmw_new_theme_setup() {
/* Add theme support for post formats. */
add_theme_support( 'post-formats' );
/* Add theme support for post thumbnails. */
add_theme_support( 'post-thumbnails' );
/* Add theme support for automatic feed links. */
add_theme_support( 'automatic-feed-links' );
/* Add theme support for menus. */
add_theme_support( 'menus' );
/* Load style files on the 'wp_enqueue_scripts' action hook. */
add_action( 'wp_enqueue_scripts', 'mmw_new_load_styles' );
}
function mmw_new_load_styles() {
$foo = bloginfo('template_url') . '/reset.css';
$bar = bloginfo('template_url') . '/rhinoslider-1.05.css';
wp_enqueue_style('reset', $foo);
wp_enqueue_style('style', bloginfo('stylesheet_url'), array('reset'));
wp_enqueue_style('rhino', $bar, array('reset','style'));
}