Created
June 24, 2015 07:32
-
-
Save Frithir/ac43662a9d7204bfe28d to your computer and use it in GitHub Desktop.
Add Current Cat to single template
This file contains 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_page() && !is_home()){ | |
$catsy = get_the_category(); | |
$myCat = $catsy[0]->cat_ID; | |
} | |
wp_list_categories('orderby=id&title_li=¤t_category='.$myCat); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment