Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adding a custom.css stylesheet to your Genesis child theme (will work for non Genesis themes as well). First create a custom.css file with your custom styles and FTP it up to your child theme directory. Then add the below code to your child theme's functions.php file.
<?php
// Do not copy opening php tag above
add_action( 'wp_enqueue_scripts', 'wsm_custom_stylesheet', 20 );
function wsm_custom_stylesheet() {
wp_enqueue_style( 'custom-style', get_stylesheet_directory_uri() . '/custom.css' );
}
@DigitalEssence

This comment has been minimized.

Copy link

commented Sep 7, 2013

Very useful, thank you. Adding this to my essential functions.

@tcolling

This comment has been minimized.

Copy link

commented Apr 28, 2016

Hi Chris -

Is it possible to do something similar to this for customizations of the php files' code by enqueing some sort of a "custom.php" file for php customizations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.