-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-job_listing-gallery.php
63 lines (43 loc) · 1.36 KB
/
single-job_listing-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
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* The Template for displaying a single listing gallery.
*
* @package Listify
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="primary" class="container">
<div class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( listify_has_integration( 'woocommerce' ) ) : ?>
<?php wc_print_notices(); ?>
<?php endif; ?>
<p class="back-to-listing">
<a href="<?php the_permalink(); ?>" class="ion-chevron-left"><?php printf( __( 'Back to %s', 'listify' ), get_the_title() ); ?></a>
</p>
<?php
$gallery = Listify_WP_Job_Manager_Gallery::get( get_post()->ID, false );
if ( empty( $gallery ) ) {
$gallery = array(0);
}
$gallery = new WP_Query( array(
'post__in' => $gallery,
'post_type' => 'attachment',
'post_status' => 'inherit',
'nopaging' => true
) );
?>
<?php if ( $gallery->have_posts() ) : ?>
<div class="content-single-job_listing-gallery-wrapper row" data-columns>
<?php while ( $gallery->have_posts() ) : $gallery->the_post(); ?>
<?php get_template_part( 'content-job_listing', 'attachment' ); ?>
<?php endwhile; ?>
</div>
<?php else : ?>
<?php _e( 'No images found.', 'listify' ); ?>
<?php endif; ?>
</main>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>