function ac_portfolio_has_images($post = 0) { // Get the post $post = get_post($post); $images = ac_get_images_for_post($post->ID, ac_get_meta('include_featured_image', null, $post->ID)); return count($images) > 0; }
echo esc_html($page_custom_subtitle); ?> </p> <?php } ?> <?php the_content(); ?> </div> <?php } else { // Images $images = ac_get_images_for_post(get_the_ID(), ac_get_meta('include_featured_image')); if (count($images)) { ?> <div class='post-images'> <?php foreach ($images as $image_id) { $a_start = ''; $a_end = ''; if ($lightbox_images) { $img = ac_resize_image_for_columns(array('image_id' => $image_id, 'columns' => 12, 'ratio' => AC_IMAGE_RATIO_PRESERVE)); $a_start = '<a class="prettyphoto" href="' . esc_url($img['url']) . '" rel="prettyPhoto[rel-' . ac_get_prettyphoto_rel() . ']"><div>'; $a_end = '</div></a>'; } echo $a_start; echo ac_render_image_for_columns(array('image_id' => $image_id, 'columns' => 7, 'ratio' => AC_IMAGE_RATIO_PRESERVE)); echo $a_end; }
<div class='ac-page-hero-img ac-no-container-padding <?php echo esc_attr($hero_class); ?> '><?php ac_render_ac_easy_slideshow(true); ?> </div><?php $show_featured_image = false; } else { if ($template_type == 'top-images-carousel') { ?> <div class='ac-page-hero-img ac-no-container-padding <?php echo esc_attr($hero_class); ?> '><?php $images = ac_get_images_for_post(ac_get_post_id(), ac_get_meta('include_featured_image', null, ac_get_post_id())); ac_render_slick_carousel_from_images($images); ?> </div><?php $show_featured_image = false; } } break; case 'ac_testimonial': $show_featured_image = false; break; case 'product': // WooCommerce $show_featured_image = false; break; }