/
images-duotive-gallery-6.php
executable file
·91 lines (89 loc) · 6.6 KB
/
images-duotive-gallery-6.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/** PAGE TEMPLATE **/
/**
* Template Name: Galery - Duotive Fullwidth - One sixth
*/
get_header(); ?>
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ) ?>/css/slideshows/duotive-fullwidth-gallery.css" />
<div id="content-wrapper">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="fullWidthGallery" class="fullWidthGallerysixth">
<div id="gallery-controls">
<a id="gallery-control-left" href="javascript: void(0)">left</a>
<a id="gallery-control-right" href="javascript: void(0)">right</a>
</div>
<?php $attached_images =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $post->ID ); ?>
<?php $attached_images = array_values($attached_images); ?>
<ul id="fullWidthGalleryUl" class="fullWidthGallerysixth">
<?php for ( $i = 0; $i < count($attached_images); $i = $i + 4) : ?>
<li class="mainlevel sixth">
<ul>
<?php $thumbnail_src = wp_get_attachment_url($attached_images[$i]->ID); ?>
<?php if ( $thumbnail_src != '' ): ?>
<li>
<a href="<?php echo $thumbnail_src; ?>" rel="gallery[modal]">
<?php $website_url = get_bloginfo('wpurl'); ?>
<?php $thumbnail_src = str_replace($website_url,'', $thumbnail_src); ?>
<span class="border"></span>
<img src="<?php echo get_bloginfo('template_directory');?>/includes/timthumb.php?src=<?php echo $thumbnail_src; ?>&h=100&w=158&zc=1&q=100" width="158" height="100" alt="<?php $description = $attached_images[$i]->post_content; if ( $description != '' ) echo $description;?>" />
</a>
</li>
<?php endif; ?>
<?php $thumbnail_src = wp_get_attachment_url($attached_images[$i+1]->ID); ?>
<?php if ( $thumbnail_src != '' ): ?>
<li>
<a href="<?php echo $thumbnail_src; ?>" rel="gallery[modal]">
<?php $website_url = get_bloginfo('wpurl'); ?>
<?php $thumbnail_src = str_replace($website_url,'', $thumbnail_src); ?>
<span class="border"></span>
<img src="<?php echo get_bloginfo('template_directory');?>/includes/timthumb.php?src=<?php echo $thumbnail_src; ?>&h=100&w=158&zc=1&q=100" width="158" height="100" alt="<?php $description = $attached_images[$i+1]->post_content; if ( $description != '' ) echo $description;?>" />
</a>
</li>
<?php endif; ?>
<?php $thumbnail_src = wp_get_attachment_url($attached_images[$i+2]->ID); ?>
<?php if ( $thumbnail_src != '' ): ?>
<li>
<a href="<?php echo $thumbnail_src; ?>" rel="gallery[modal]">
<?php $website_url = get_bloginfo('wpurl'); ?>
<?php $thumbnail_src = str_replace($website_url,'', $thumbnail_src); ?>
<span class="border"></span>
<img src="<?php echo get_bloginfo('template_directory');?>/includes/timthumb.php?src=<?php echo $thumbnail_src; ?>&h=100&w=158&zc=1&q=100" width="158" height="100" alt="<?php $description = $attached_images[$i+2]->post_content; if ( $description != '' ) echo $description;?>" />
</a>
</li>
<?php endif; ?>
<?php $thumbnail_src = wp_get_attachment_url($attached_images[$i+3]->ID); ?>
<?php if ( $thumbnail_src != '' ): ?>
<li>
<a href="<?php echo $thumbnail_src; ?>" rel="gallery[modal]">
<?php $website_url = get_bloginfo('wpurl'); ?>
<?php $thumbnail_src = str_replace($website_url,'', $thumbnail_src); ?>
<span class="border"></span>
<img src="<?php echo get_bloginfo('template_directory');?>/includes/timthumb.php?src=<?php echo $thumbnail_src; ?>&h=100&w=158&zc=1&q=100" width="158" height="100" alt="<?php $description = $attached_images[$i+3]->post_content; if ( $description != '' ) echo $description;?>" />
</a>
</li>
<?php endif; ?>
</ul>
</li>
<?php endfor; ?>
</ul>
</div>
<div id="content" class="content-full-width clearfix">
<div class="page">
<?php $slider_display = get_option('slider_display'); if ( $slider_display == '' ) $slider_display = '1'; else $slider_display = get_option('slider_display'); ?>
<?php if ( $slider_display == 0 ) : ?>
<h1 class="page-title">
<?php the_title(); ?>
</h1>
<?php endif; ?>
<div class="content">
<?php the_content(); ?>
<!--end of content -->
</div>
<!-- end of page -->
</div>
<!-- end of content -->
</div>
<?php endwhile; ?>
<!--end of content-wrapper -->
</div>
<?php get_footer(); ?>