'name', ); $show_child_category_hierarchy = false; } else { $args = array( 'orderby' => 'name', 'parent' => 0 ); $show_child_category_hierarchy = true; } $categories = get_categories( $args ); $exclude_id = ""; $number_of_galleries = ""; foreach ( $categories as $cat ) { $title = $cat->name; bornholm_get_galleries_from_category( $cat, $exclude_id, $number_of_galleries, 'h2', $title, $show_child_category_hierarchy ); } } else { $args = array( 'posts_per_page' => '-1', 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-gallery' ) ) ); $galleries = get_posts( $args ); bornholm_loop_galleries_from_category( $galleries, '', '', '', '' ); } ?>