Created
July 14, 2015 01:05
-
-
Save pablocattaneo/eb1c096d42585083b1af to your computer and use it in GitHub Desktop.
Devuelve el slug de la categoría. Es decir si la url es "http://localhost/ayaingenieria/category/trabajos/" devuelve la palabra trabajos. Se debe usar en el template de 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 | |
| if (is_category( )) { | |
| $cat = get_query_var('cat'); | |
| $yourcat = get_category ($cat); | |
| echo 'the slug is '. $yourcat->slug; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment