?> > <?php zilla_post_start(); ?> <?php if (is_singular('post')) { echo hanna_post_gallery($post->ID, 'full'); } elseif (is_layout_standard()) { echo '<div class="media-bg">'; hanna_post_thumbnail($post->ID); echo hanna_post_gallery($post->ID, 'full'); echo '</div>'; } else { echo hanna_post_gallery($post->ID, 'portfolio-featured-image'); } ?> <!--BEGIN .entry-header--> <header class="entry-header"> <?php hanna_post_title(); hanna_post_meta_header(); ?> <!--END .entry-header--> </header> <?php hanna_the_content(); hanna_post_footer();
/** * Return the portfolio media portion of content * @param int $p the post id * @param array $meta the meta content * @return string HTML for output */ function hanna_portfolio_media($p, $meta) { $output = '<div class="portfolio-media-main">'; if ($meta['display_video']) { // if showing a video, it gets featured spot if ($meta['display_gallery'] && $meta['display_audio']) { // if showing audio and gallery, add audio to gallery code add_filter('hanna_filter_gallery_content', 'hanna_add_audio_to_gallery', 10, 2); // add gallery to output $output .= hanna_post_gallery($p, 'full', 'stacked'); } elseif ($meta['display_audio']) { // showing video and audio; video gets preemo spot, add audio here $output .= hanna_print_audio_html($p); } elseif ($meta['display_gallery']) { // showing video and gallery; video gets preemo spot, add gallery here $output .= hanna_post_gallery($p, 'full', 'stacked'); } } elseif ($meta['display_audio']) { // if showing audio it gets featured spot if ($meta['display_gallery']) { // showing audio and gallery; audio gets preemo spot, add gallery here $output .= hanna_post_gallery($p, 'full', 'stacked'); } } elseif ($meta['display_gallery']) { // displaying only a gallery; featured image in preemo spot, add gallery here $output .= hanna_post_gallery($p, 'full', 'stacked'); } $output .= '</div>'; echo $output; }
function gallery_func($atts) { $the_ID = get_the_id(); error_log("the_ID before = " . $the_ID); // Spanish is the canonical version of posts, get ID of Spanish version if (function_exists("pll_get_post")) { $the_ID = pll_get_post($the_ID, 'es'); } error_log("the_ID after = " . $the_ID); $output = hanna_post_gallery($the_ID, 'large'); return $output; }
?> " <?php post_class(); ?> > <?php zilla_page_start(); ?> <?php // rewrite so that if there is a thumbnail, use that // if not, check for gallery & use that // i.e. gallery is only 'featured' if there is no featured image $gallery = get_post_meta($post->ID, '_zilla_image_ids', true); if ($gallery != 'false') { echo hanna_post_gallery($post->ID, 'full'); } hanna_page_header(); hanna_the_content(); ?> <?php zilla_page_end(); ?> <!--END .page--> </article> <?php zilla_page_after(); ?> <?php
<header class="entry-header"> <?php if ($format == '') { hanna_post_thumbnail($post->ID); } ?> <div class="entry-title-wrapper"> <?php hanna_post_title(); ?> </div> <!--END .entry-header--> </header> <?php if ($format == 'gallery') { echo hanna_post_gallery($post->ID); } else { hanna_the_content(true); // this hanna_post_footer(); } ?> <?php zilla_post_end(); ?> <!--END .post--> </article> <?php zilla_post_after();