-
-
Save leanneromak/248805422a40116dda9d to your computer and use it in GitHub Desktop.
php conditional for post class
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 if( is_single( 'field_name1' ) ): ?> | |
//do something | |
<?php elseif( is_single( 'fieldname2' ) ): ?> | |
//do something else | |
<?php elseif( is_single( '' ) ): ?> | |
//this is the default | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment