Created
May 25, 2013 19:00
-
-
Save aaronj1335/5650329 to your computer and use it in GitHub Desktop.
check if post is in category
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 | |
| c++; | |
| if (in_array(1, wp_get_post_categories($post.id)) && $c == 1) { ?> | |
| this text will only show up if $post is in category 1 and the counter is 1 | |
| <?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment