Skip to content

Instantly share code, notes, and snippets.

@sbellver
Created November 27, 2014 17:17
Show Gist options
  • Save sbellver/3b4fcb62508b95119f9d to your computer and use it in GitHub Desktop.
Save sbellver/3b4fcb62508b95119f9d to your computer and use it in GitHub Desktop.
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