To add your own css in the wp_head(), you need to use a collection of WordPress functions:
First, you'll put this in your theme's functions.php file:
add_action('wp_enqueue_scripts', 'your_function_name');
(This uses the add action hook, hooking into the wp_enqueue_scripts action.)
Then, you'll need to add the function to your functions.php file that will utilize the WordPress function wp_enqueue_style:
function your_function_name() {
wp_enqueue_style('my-script-slug', get_stylesheet_directory_uri() . '/your_style.css');
}
Note the use of get_stylesheet_directory_uri() - this gets the proper stylesheet directory for your theme.
This is also the proper way to enqueue scripts into your header. Example:
function your_function_name() {
// Enqueue the style
wp_enqueue_style('my-script-slug', get_stylesheet_directory_uri() . '/your_style.css');
// Enqueue the script
wp_enqueue_script('my-script-slug', get_stylesheet_directory_uri() . '/your_script.js');
}
Which uses the WordPress wp_enqueue_script function.
Finally, it is worth mentioning that altering the twenty thirteen (or any other core theme) theme directly is usually discouraged. The recommendation is to create a child theme (overkill in my opinion, but worth mentioning).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…