Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom CSS per page into Genesis
<? //REMOVE PHP ENTRY
add_action('genesis_meta','genesis_custom_css');
function genesis_custom_css() {
if (is_page(23)) echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/css/azul.css" type="text/css" media="screen" />'.""; //PAGE ID 23
if (is_page(21)) echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/css/gris.css" type="text/css" media="screen" />'.""; //PAGE ID 21
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment