Created
November 8, 2012 20:24
-
-
Save Zeaksblog/4041343 to your computer and use it in GitHub Desktop.
Featured image post class
This file contains hidden or 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 | |
| function appendPostClassHasFeaturedImageClass($classes) { | |
| if(current_theme_supports('post-thumbnails')) | |
| if(has_post_thumbnail()) | |
| $classes[] = "has-featured-image"; | |
| return $classes; | |
| } add_filter('post_class', "appendPostClassHasFeaturedImageClass"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment