Skip to content

Instantly share code, notes, and snippets.

@Frithir
Created June 24, 2015 07:32
Show Gist options
  • Save Frithir/ac43662a9d7204bfe28d to your computer and use it in GitHub Desktop.
Save Frithir/ac43662a9d7204bfe28d to your computer and use it in GitHub Desktop.
Add Current Cat to single template
<?php
if (!is_page() && !is_home()){
$catsy = get_the_category();
$myCat = $catsy[0]->cat_ID;
}
wp_list_categories('orderby=id&title_li=&current_category='.$myCat);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment