?> <article id="post-<?php the_ID(); ?> " <?php post_class(['site-width']); ?> > <header> <h1 class="page-title screen-reader-text cursive light tc lowercase"><?php single_post_title(); ?> </h1> </header> <div class="entry-content tc"><?php the_split_content(true); ?> </div><!-- .entry-content --> <?php set_query_var('app', \Hitched\Hitched::instance()); get_template_part("pages/{$post->post_name}"); ?> <div class="entry-content tc"><?php the_split_content(false); ?> </div><!-- .entry-content --> </article> </main><!-- .site-main --> </div><!-- .content-area --> <?php get_footer();
<?php use Hitched\Hitched as H; $ids = array_map(function ($img) { return $img->ID; }, array_filter(get_attached_media('image'), function ($img) { return !empty($img->post_excerpt); })); $images = H::instance()->customPostsQuery($ids, ['text' => ['_wp_attachment_metadata']]); $titles = array_map(function ($img) { return $img->post_title; }, $images); array_multisort($titles, SORT_ASC, SORT_REGULAR, $images); ?> <h1 class="page-title cursive light tc lowercase">Gowns</h1> <div class="designers-gallery"> <?php for ($colcount = 3; $colcount > 1; $colcount--) { ?> <ul class="horizontal-list tc col-<?php echo $colcount; ?> "> <?php foreach ($images as $i => $img) { $metadata = unserialize($img->_wp_attachment_metadata); $thumbnail = str_replace(wp_basename($metadata['file']), $metadata['sizes']['medium']['file'], $img->guid); ?> <li data-col-index="<?php echo $i % $colcount; ?>