forked from CRIK0VA/alethemes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-gallery.php
executable file
·50 lines (44 loc) · 1.58 KB
/
single-gallery.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php get_header(); ?>
<!-- Content -->
<div class="portfolio-single-center-align">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="portfolio-single-title">
<h2><?php the_title(); ?></h2>
<p><?php _e('by','aletheme'); ?> <a href=""><?php echo the_author_posts_link(); ?></a> <?php _e('on','aletheme'); ?> <?php echo get_the_date(); ?></p>
<a href="<?php echo home_url();?>/gallery" class="back"><?php _e('< back to the gallery','aletheme'); ?></a>
</div>
<section class="slider">
<div id="slider" class="flexslider portfolioslider">
<ul class="slides">
<?php $args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'order' => 'ASC',
'orderby' => 'menu_order ID',
'meta_query' => array(
array(
'key' => '_ale_hide_from_gallery',
'value' => 0,
'type' => 'DECIMAL',
),
),
'post_parent' => $post->ID
);
$attachments = get_posts( $args );
if ( $attachments ) {
foreach ( $attachments as $attachment ) { ?>
<li>
<?php echo wp_get_attachment_image( $attachment->ID, 'gallery-big' ); ?>
</li>
<?php }
} ?>
</ul>
</div>
<div class="gallerydescriptionbox">
<?php the_content(); ?>
</div>
</section>
<?php endwhile; endif; ?>
</div>
<?php get_footer(); ?>