Created
November 29, 2016 17:11
-
-
Save luisfelipe-dev/f394768a5ecd918c0fb0cdaecad7dea0 to your computer and use it in GitHub Desktop.
Este código mostra em qual categoria esta aplicado o post
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 | |
| global $post; | |
| $categoria = get_the_category($post->id); | |
| $nomeCategoria = $categoria[0]->cat_name; | |
| echo $nomeCategoria; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment