Created
February 3, 2017 12:51
-
-
Save pixelbart/9f145ee7f19f71780822fa08e1a93a9c to your computer and use it in GitHub Desktop.
Post formats example
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 | |
| // functions.php | |
| add_theme_support( 'post-formats', array( 'video', 'gallery' ) ); | |
| // single.php | |
| // Innerhalb des WordPress Loops | |
| if( get_post_format() == 'video' ) : | |
| the_title(); | |
| endif; | |
| if( get_post_format() == 'gallery' ) : | |
| the_title(); | |
| endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment