This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathpage-downloadfreepack.php
More file actions
161 lines (142 loc) · 5.97 KB
/
Copy pathpage-downloadfreepack.php
File metadata and controls
161 lines (142 loc) · 5.97 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
/**
* Template name: Download Free Pack
*
* The template for displaying Download Free Pack.
*
* @package CodeInWp.
*/
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php the_title(); ?></title>
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Crete+Round:400,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/downloadfreepack.css" />
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/nivo-lightbox.css" />
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/themes/default/default.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/nivo-lightbox.js"></script>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<header>
<div class="wrapper cf">
<a href="<?php echo home_url(); ?>" id="logo" title="<?php the_title(); ?>">
<img src="<?php echo get_template_directory_uri(); ?>/images/logo-1.png" alt="">
</a> <!-- a#logo -->
<h1><?php the_title(); ?></h1>
</div> <!-- /.wrapper -->
</header>
<section role="main" class="cf">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
$featured_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
$downloadfreepack_images = get_post_meta($post->ID, 'cwp_downloadfreepack_images', true); ?>
<div class="wrapper cf">
<?php
if ( $featured_image ) {
echo '<div id="assets"><img src="'. $featured_image[0] .'" title="'. get_the_title() .'" alt="'. $get_the_title .'" /></div>';
}
if ( $featured_image == NULL ) {
$content_form_class = ' no-featured-image';
}
?>
<div class="content-form<?php echo $content_form_class; ?>">
<?php the_content(); ?>
</div> <!-- /#content-form -->
<div class="cf"></div>
<a data-popup-target="#example-popup" id="dld" class="popup_window"><?php _e( 'Download', 'cwp' ); ?></a>
<?php
if ( $downloadfreepack_images ) {
echo '<div class="content-gallery cf">';
foreach( $downloadfreepack_images as $downloadfreepack_image ) {
echo '<a href="'. $downloadfreepack_image['title'] .'" data-lightbox-gallery="gallery">';
echo '<div class="content-gallery-image" style="background-image: url('. $downloadfreepack_image['title'] .');"></div>';
echo '</a>';
}
echo '</div>';
}
?>
<div id="example-popup" class="popup">
<div class="popup-body"><span class="popup-exit"></span>
<div class=" popup-content">
<h2 class="popup-title"><?php _e( 'Download Something', 'cwp' ); ?></h2>
<?php
/*
<form>
<input type="text" placeholder="<?php _e( 'Your email', 'ti' ); ?>">
<input type="submit" value="<?php _e( 'Send', 'ti' ); ?>">
</form>
*/
?>
<form action="http://codeinwp.us3.list-manage.com/subscribe/post?u=bf06b9a7223d1c8f65272caf7&id=bd98fdaf54" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate cf" target="_blank" novalidate>
<input type="email" value="" name="EMAIL" class="emailinput animated flipInY" id="mce-EMAIL" placeholder="Your e-mail address" required>
<div style="position: absolute; left: -5000px;"><input type="text" name="b_bf06b9a7223d1c8f65272caf7_bd98fdaf54" value="">
</div>
<input type="submit" name="subscribe" id="mc-embedded-subscribe" class="subscribe animated flipInY" value="Subscribe">
</form>
</div> <!-- popup-content -->
</div>
</div> <!-- #example-popup .popup -->
<div class="popup-overlay">
</div><!-- /.popup-overlay -->
<script>
jQuery(document).ready(function($) {
$(window).load(function(){
jQuery(document).ready(function ($) {
$('[data-popup-target]').click(function () {
$('html').addClass('overlay');
var activePopup = $(this).attr('data-popup-target');
$(activePopup).addClass('visible');
});
$(document).keyup(function (e) {
if (e.keyCode == 27 && $('html').hasClass('overlay')) {
clearPopup();
}
});
$('.popup-exit').click(function () {
clearPopup();
});
$('.popup-overlay').click(function () {
clearPopup();
});
function clearPopup() {
$('.popup.visible').addClass('transitioning').removeClass('visible');
$('html').removeClass('overlay');
setTimeout(function () {
$('.popup').removeClass('transitioning');
}, 200);
}
});
});
$(document).ready(function(){
$('.content-gallery a').nivoLightbox();
});
});
</script>
</div> <!-- /.wrapper -->
<?php }
}
?>
</section>
<div class="cf"></div>
<footer class="cf">
<div class="wrapper">
<p><?php _e( 'Copyright © 2014', 'cwp' ); ?> <a href="http://www.themeisle.com" title="<?php _e( 'ThemeIsle', 'ti' ); ?>" target="_blank"><?php _e( 'ThemeIsle', 'ti' ); ?></a></p>
<nav>
<ul>
<li><a href="http://www.codeinwp.com/blog" title="<?php _e( 'Blog', 'cwp' ); ?>" target="_blank"><?php _e( 'Blog', 'cwp' ); ?></a></li>
<li><a href="http://www.codeinwp.com" title="<?php _e( 'Services', 'cwp' ); ?>" target="_blank"><?php _e( 'Services', 'cwp' ); ?></a></li>
</ul>
</nav>
</div> <!-- /.wrapper -->
</footer>
</body>
</html>