function hasChildCategory(){
	global $wp_query;
	$cat_ID = get_query_var('cat');//获取当前栏目id;
	$category = get_the_category();
	$parent_catid=$category[0]->category_parent; //获取父类Id;
	return $cat_ID==$parent_catid; //判断当前栏目id是否和其父类Id
}

没有账号? 注册  忘记密码?

社交账号快速登录