Created
August 1, 2014 01:20
-
-
Save bytefade/32f8515421fd7d20e8a4 to your computer and use it in GitHub Desktop.
Wordpress. Agora na sua página, adicione um campo customizado com o nome de ‘category’, e o valor sendo o slug da categoria.
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
<? | |
the_post(); | |
$keys = get_post_custom_keys(); | |
if(in_array("category",$keys)) { | |
$categoryslug = get_post_custom_values("category"); | |
query_posts('category_name='.$categoryslug[0]); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment