Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get the children categories of a category
<?php $catname =single_cat_title("",false);
$catId= get_cat_ID($catname);?>

This comment has been minimized.

Copy link
Owner Author

@kuratowsky kuratowsky commented May 27, 2012

Use single_cat_title() instead wp_title(). The first is more secure than wp_title(). The whole of SEO plugins can change the title, and use the wp_title() method to do this. If title!=category name don't causes an error, but you can see all of the categories of your blog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment