-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent-gallery.php
71 lines (54 loc) · 2.02 KB
/
content-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
64
65
66
67
68
69
70
71
<?php
/**
* @package Great Plains Landscaping
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
</header>
<!-- .entry-header -->
<div class="entry-content gallery-content">
<?php the_content(); ?>
</div>
<!-- .entry-content -->
<p>test - does this page work? YES IT DOES!!!</p>
<?php
$args = array(
"post_status"=>"publish",
"post_type"=>"image", // I'm not sure if its a custom post type or not.
"posts_per_page"=>100 // how many do you want to see?
);
$galleries = new WP_Query( $args ); // let's get that query object
// HERE IS YOUR LOOP
if ( $galleries->have_posts() ) {
?>
<div class="row gallery-group">
<h2>View some of our galleries!</h2>
<?php
while ( $galleries->have_posts() ) {
$galleries->the_post();
// This is the section that actually repeats.
?>
<div class="col-lg-2 col-md-4 col-sm-6 col-xs-6">
<div class="hovereffect">
<img class="img-responsive" src="<?php echo get_field(" gallery_image ");?>" alt="<?php echo get_field(" gallery_title ");?>">
<div class="overlay">
<h2><?php echo get_field("gallery_title");?>/h2>
<a class="info" href="<?php echo $permalink = get_permalink(get_the_id()); ?>">gallery_link</a>
</div>
</div>
</div>
<?php
// OK we're done repeating here.
}
echo '</div>'; // close up that div at the top.
} else {
// No posts. We're all doomed!!!
}
// Reset that post data, dawg.
wp_reset_postdata();
?>
<footer class="entry-footer">
</footer><!-- .entry-footer -->
</article><!-- #post-## -->