function extra_has_project_gallery_post_class($classes, $class, $post_id) { if ('project' === get_post_type($post_id) && is_single()) { $attachments = extra_get_the_project_gallery_images(); if (empty($attachments)) { $classes[] = 'et-doesnt-have-project-gallery'; } else { $classes[] = 'et-has-project-gallery'; } } return $classes; }
?> </h1> <div class="post-meta"> <p> <?php echo et_extra_display_post_meta(array('rating_stars' => false)); ?> </p> </div> </div> <?php } ?> <?php $attachments = extra_get_the_project_gallery_images(); $thumbnail_id = get_post_thumbnail_id(); if ($attachments) { ?> <?php $gallery_autoplay = get_post_meta(get_the_ID(), '_gallery_autoplay', true); ?> <div class="post-thumbnail post-gallery"> <div class="gallery et-slider" data-autoplay="<?php echo $gallery_autoplay ? esc_attr($gallery_autoplay) : ''; ?> "> <div class="carousel-items"> <div class="carousel-item-size"></div> <?php foreach ($attachments as $attachment_id => $attachment_src) {