-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-lookbook.php
More file actions
63 lines (55 loc) · 1.84 KB
/
page-lookbook.php
File metadata and controls
63 lines (55 loc) · 1.84 KB
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
/*
Template Name: Lookbook
*/
// Add specific CSS class by filter
add_filter('body_class','custom_classname');
function custom_classname($classes) {
$classes[] = 'lookbook';
return $classes;
}
$bgImage = false;
get_header(); ?>
<?php roots_content_before(); ?>
<div id="content-wrapper">
<div id="content" class="<?php echo CONTAINER_CLASSES; ?>">
<?php roots_main_before(); ?>
<div id="main" class="<?php echo MAIN_CLASSES; ?> isotope-item" role="main">
<?php roots_loop_before(); ?>
<?php /* Start loop */ ?>
<?php while (have_posts()) : the_post(); ?>
<?php roots_post_before(); ?>
<?php roots_post_inside_before(); ?>
<?php the_content(); ?>
<?php roots_post_inside_after(); ?>
<?php roots_post_after(); ?>
<?php endwhile; /* End loop */ ?>
</div><!-- /#main -->
<?php /* Start lookbook loop */
query_posts("post_type=lookbook&posts_per_page=-1&orderby=rand");
?>
<?php while (have_posts()) : the_post(); ?>
<?php roots_post_before(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php // roots_post_inside_before();
?>
<?php
$image = wp_get_attachment_image_src(get_field('image'), 'thumbnail');
$large = wp_get_attachment_image_src(get_field('image'), 'large');
?>
<a class="fancybox" rel="lookbook" href="<?php echo $large[0]; ?>">
<img src="<?php echo $image[0]; ?>" alt="<?php echo get_the_title(get_field('image_test')); ?>" />
</a>
<div class="caption"><?php echo get_field('caption'); ?></div>
<?php // roots_post_inside_after();
?>
</div>
<?php roots_post_after(); ?>
<?php endwhile; /* End lookbook loop */ ?>
</ul>
<?php roots_loop_after(); ?>
<?php roots_main_after(); ?>
</div><!-- /#content -->
</div><!-- /#content-wrapper -->
<?php roots_content_after(); ?>
<?php get_footer(); ?>