To enqueue a custom stylesheet in WordPress, you would use the wp_enqueue_style()
function. For example, the following code would enqueue a custom stylesheet called “custom.css” in your theme directory:
function enqueue_custom_stylesheet() {
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/custom.css' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_custom_stylesheet' );
PHP
This code would add the custom stylesheet to the list of stylesheets that are loaded on your WordPress site.