Created
July 16, 2012 17:45
-
-
Save zackn9ne/3123975 to your computer and use it in GitHub Desktop.
WordPress PHP if Else
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 if(is_category(10)): ?> | |
some html | |
<?php else: ?> | |
other html | |
<?php endif; ?> |
some html
other html
This way is better, no braces, more html friendly :)
gist updated XD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just do it that way so I can put standard HTML in between the curly braces and break out of PHP and back in for the next condition.