| Server IP : 35.154.56.2 / Your IP : 216.73.217.116 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-0-189 6.8.0-1029-aws #31-Ubuntu SMP Wed Apr 23 18:20:04 UTC 2025 aarch64 User : ubuntu ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /srv/prima-automation.com/html/wp-content/themes/bapl/views/ |
Upload File : |
<?php
$args = array('post_type' => 'gallery', 'post_status' => 'publish', 'posts_per_page' => -1);
$galleryQuery = new WP_Query($args);
if ($galleryQuery->have_posts()) :
while ($galleryQuery->have_posts()) : $galleryQuery->the_post();
$galleryAttributes = get_post_meta(get_the_ID(), 'galleryattributes', true);
if(is_array($galleryAttributes) && count($galleryAttributes)) :
?>
<h2 class="text-left border-btm"><?php echo get_the_title(); ?></h2>
<div class="row gallery">
<?php
foreach($galleryAttributes as $attribute) {
$thumbImgSRC = wp_get_attachment_image_src($attribute['gallery-attribute-image'], 'bapl-gallery-thumbnail');
$imgSRC = wp_get_attachment_image_src($attribute['gallery-attribute-image'], 'full');
?>
<div class="col-md-4 col-sm-6 col-xs-6">
<div class="gallery-img">
<a href="<?php echo $imgSRC[0]; ?>" class="fancybox" rel="gal" title="<?php echo $attribute['gallery-attribute-title'] ?>">
<img src="<?php echo $thumbImgSRC[0]; ?>" alt="<?php echo $attribute['gallery-attribute-title'] ?>" class="img-responsive">
<span class="border-overlay"><span class="zoom"></span></span>
</a>
<?php if($attribute['gallery-attribute-title']) : ?><h4><?php echo $attribute['gallery-attribute-title']; ?></h4><?php endif; ?>
</div>
</div>
<?php
}
?>
</div>
<script>
jQuery(document).ready(function () {
jQuery(".fancybox").fancybox( {padding: 0} );
});
</script>
<?php
endif;
endwhile;
endif;
?>