$fields = CFS()->get( 'gallery' );
shuffle($fields); $category = get_queried_object();
$child_categories = get_term_children( $category->term_id, 'category');if( $category instanceof WP_Term ) {
$child_categories = get_term_children( $category->term_id, 'category');
}