Magento Engineer
social
Journal

How do I add a custom stylesheet in WordPress?

Rather then loading the stylesheet in your header.php file statically, you should load it in using wp_enqueue_style. In order to load your main stylesheet, you can enqueue it in functions.php

function theme_styles()  
{
    wp_register_style( 'responsive', get_template_directory_uri() . '/assets/css/responsive.css' );
    wp_enqueue_style('responsive');
    
}
add_action('wp_enqueue_scripts', 'theme_styles');

Ad comes here
Comments
Leave A Comment
PHP blog
Update Cookies Preferences