Created
December 18, 2012 04:03
-
-
Save marcel-valdez/4324899 to your computer and use it in GitHub Desktop.
Piece of code to add custom css to a specific wordpress post using custom fields.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$custom_css = get_post_custom_values('custom_css', $post->ID); | |
if ($custom_css != null && count($custom_css) > 0 ) { | |
echo '<link rel="stylesheet" type="text/css" media="all" href="'. $custom_css[0] .'" />'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment