This repository was archived by the owner on Jul 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
341 lines (339 loc) · 17.7 KB
/
header.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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php language_attributes('html'); ?>>
<head>
<!-- etiquetas de meta informacion -->
<meta charset="<?php bloginfo('charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximumscale=2.0, user-scalable=0">
<!-- Título del sitio -->
<title><?php wp_title( '|', true, 'right' ); bloginfo('name' ); ?></title>
<!-- Cargando favicon -->
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri().'/images/favicon.ico" type="image/x-icon' ?>" />
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon.png' ?>" />
<link rel="apple-touch-icon" sizes="57x57" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-57x57.png' ?>" / >
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-72x72.png' ?>" />
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-114x114.png' ?>" />
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-144x144.png' ?>" />
<link rel="apple-touch-icon" sizes="57x57" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-60x60.png' ?>" />
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-120x120.png' ?>" />
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-76x76.png' ?>" />
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo get_stylesheet_directory_uri().'/images/apple-touch-icon-152x152.png' ?>" />
<!-- MailChimp -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css">
<!-- Windows 8 Tile Icons -->
<meta name="msapplication-square70x70logo" content="<?php echo get_stylesheet_directory_uri().'/images/smalltile.png' ?>" />
<meta name="msapplication-square150x150logo" content="<?php echo get_stylesheet_directory_uri().'/images/mediumtile.png' ?>" />
<meta name="msapplication-wide310x150logo" content="<?php echo get_stylesheet_directory_uri().'/images/widetile.png' ?>" />
<meta name="msapplication-square310x310logo" content="<?php echo get_stylesheet_directory_uri().'/images/largetile.png' ?>" />
<!-- Lineas necesarias para un correcto funcionamiento de WP -->
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php if (is_singular()) {
wp_enqueue_script('comment-reply' );
} ?>
<?php
wp_head();
ega_options_head();
?>
<!--[if lt IE 9]>
<script src="<?php echo get_stylesheet_directory_uri().'js/html5shiv.js'?>"></script>
<![endif]-->
</head>
<body <?php body_class(); ?>>
<div id="container-total" class="container-fluid">
<nav id="nav-theme">
<div class="row">
<div id="site-logo" class="col-xs-6 col-sm-6 col-md-6">
<a href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>">
<?php $logo_ega_nav = of_get_option( 'ega_logo', get_stylesheet_directory_uri().'/images/ega.png' );
if ( $logo_ega_nav && !empty($logo_ega_nav) ) { ?>
<img src="<?php echo $logo_ega_nav ?>" title="<?php bloginfo( 'name' ); ?>" alt="<?php bloginfo( 'name' ); ?>" />
<?php } else { ?>
<img src="<?php echo get_stylesheet_directory_uri().'/images/ega.png' ?>" title="<?php bloginfo( 'name' ); ?>" alt="<?php bloginfo( 'name' ); ?>" />
<?php } ?>
</a>
</div>
<div id="site-menu" class="col-xs-12 col-sm-12 col-md-6">
<?php
wp_nav_menu(array(
'theme_location' => __('menu-principal', 'ega'),
'menu' => 'main-menu',
'container' => 'nav',
'container_class' => 'container-menu-class',
'container_id' => 'container-menu-id',
'menu_class' => 'menu-class',
'menu_id' => 'nav',
'echo' => '1',
'fallback_cb' => '',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'depth' => '4',
'walker' => ''
));
?>
</div>
<div id="menu-small-device" class="col-xs-5 col-sm-5">
<?php
wp_nav_menu(array(
'theme_location' => __('menu-small-device', 'ega'),
'menu' => 'main-menu-small-device',
'container' => 'nav',
'container_class' => 'container-menu-small-device-class',
'container_id' => 'container-menu-small-device-id',
'menu_class' => 'menu-class',
'menu_id' => 'nav-small',
'echo' => '1',
'fallback_cb' => '',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'depth' => '4',
'walker' => ''
));
?>
</div>
</div>
</nav>
<header id="head-header">
<div id="contenedor-header" class="row">
<div id="title-header" class="col-xs-12 col-sm-12 col-md-6">
<div id="logo-title" class="col-md-2"></div>
<div id="container-main-title" class="col-md-10">
<h1 id="main-title"><?php bloginfo('name'); ?>
<br/>
<br/>
<small><?php bloginfo('description'); ?></small>
</h1>
<div id="social-icon">
<?php
$ega_fb = of_get_option( 'ega_facebook_icon', '' );
$ega_tw = of_get_option( 'ega_twitter_icon', '' );
$ega_gp = of_get_option( 'ega_googleplus_icon', '' );
$ega_yt = of_get_option( 'ega_youtube_icon', '');
$id_fb = of_get_option( 'ega_facebook_id', '' );
$id_tw = of_get_option( 'ega_twitter_id', '' );
$id_gp = of_get_option( 'ega_googleplus_id', '' );
$id_yt = of_get_option( 'ega_youtube_id', '' );
if( $ega_fb == 1 ) { ?>
<a href="<?php if( $id_fb && !empty( $id_fb ) ) { echo "https://www.facebook.com/".$id_fb; } else { echo "#"; } ?>" target="new">
<img src="<?php echo get_stylesheet_directory_uri().'/images/icono_facebook.png' ?>" alt="<?php if( $id_fb && !empty( $id_fb ) ) { echo $id_fb; } else { echo "#"; } ?>" title="<?php if( $id_fb && !empty( $id_fb ) ) { echo $id_fb; } else { echo "#"; } ?>" />
</a>
<?php }
if( $ega_tw == 1 ) { ?>
<a href="<?php if( $id_tw && !empty( $id_tw ) ) { echo "https://www.twitter.com/".$id_tw; } else { echo "#"; } ?>" target="new">
<img src="<?php echo get_stylesheet_directory_uri().'/images/icono_twitter.png' ?>" alt="<?php if( $id_tw && !empty( $id_tw ) ) { echo $id_tw; } else { echo "#"; } ?>" title="<?php if( $id_tw && !empty( $id_tw ) ) { echo $id_tw; } else { echo "#"; } ?>" />
</a>
<?php }
if( $ega_gp == 1 ) { ?>
<a href="<?php if( $id_gp && !empty( $id_gp ) ) { echo "https://www.google.com/".$id_gp; } else { echo "#"; } ?>" target="new">
<img src="<?php echo get_stylesheet_directory_uri().'/images/icono_googleplus.png' ?>" alt="<?php if( $id_gp && !empty( $id_gp ) ) { echo $id_gp; } else { echo "#"; } ?>" title="<?php if( $id_gp && !empty( $id_gp ) ) { echo $id_gp; } else { echo "#"; } ?>" />
</a>
<?php }
if( $ega_yt == 1 ) { ?>
<a href="<?php if( $id_yt && !empty( $id_yt ) ) { echo "https://www.youtube.com/user/".$id_yt; } else { echo "#"; } ?>" target="new">
<img src="<?php echo get_stylesheet_directory_uri().'/images/icono_youtube-md.png' ?>" alt="<?php if( $id_yt && !empty( $id_yt ) ) { echo $id_yt; } else { echo "#"; } ?>" title="<?php if( $id_yt && !empty( $id_yt ) ) { echo $id_yt; } else { echo "#"; } ?>" />
</a>
<?php } ?>
</div>
</div>
</div>
<div id="slider-header" class="col-xs-12 col-sm-12 col-md-6">
<div class="container-slider">
<div id="slider">
<div id="mask">
<ul>
<li>
<?php
$url_slide1 = of_get_option( 'ega_url_img_slider_1', '');
$img_slide1 = of_get_option( 'ega_slider_img_1', '' );
$tt_slide1 = of_get_option( 'ega_tt_img_slider_1', '' );
$desc_slide1 = of_get_option( 'ega_desc_img_slider_1', '' );
$url_slide2 = of_get_option( 'ega_url_img_slider_2', '');
$img_slide2 = of_get_option( 'ega_slider_img_2', '' );
$tt_slide2 = of_get_option( 'ega_tt_img_slider_2', '' );
$desc_slide2 = of_get_option( 'ega_desc_img_slider_2', '' );
$url_slide3 = of_get_option( 'ega_url_img_slider_3', '');
$img_slide3 = of_get_option( 'ega_slider_img_3', '');
$tt_slide3 = of_get_option( 'ega_tt_img_slider_3', '' );
$desc_slide3 = of_get_option( 'ega_desc_img_slider_3', '' );
$url_slide4 = of_get_option( 'ega_url_img_slider_4', '');
$img_slide4 = of_get_option( 'ega_slider_img_4', '' );
$tt_slide4 = of_get_option( 'ega_tt_img_slider_4', '' );
$desc_slide4 = of_get_option( 'ega_desc_img_slider_4', '' );
if ( $img_slide1 && !empty( $img_slide1 ) ) { ?>
<a href="<?php if( $url_slide1 && !empty( $url_slide1 ) ) { echo $url_slide1; } else { echo '#'; } ?>" title="<?php if ( $tt_slide1 && !empty( $tt_slide1 ) ) { echo $tt_slide1; } else { echo "titulo no disponible"; }?>">
<img src="<?php echo $img_slide1 ?>" alt="<?php if( $tt_slide1 && !empty( $tt_slide1 ) ) { echo $tt_slide1; } ?>" title="<?php if( $tt_slide1 && !empty( $tt_slide1 ) ) { echo $tt_slide1; } ?>" />
</a>
<span>
<?php
if ( $tt_slide1 && !empty( $tt_slide1 ) ) { ?>
<h2><?php echo $tt_slide1 ?></h2>
<?php } else { ?>
<h2>Title 1</h2>
<?php }
if ( $desc_slide1 && !empty( $desc_slide1 ) ) { ?>
<p><?php echo $desc_slide1 ?></p>
<?php } else { ?>
<p>Lorem ipsum dolor...</p>
<?php } ?>
</span>
<?php } else {
$slide_posts = new WP_Query("post_type=post&post_status=publish");
if ( $slide_posts->have_posts() ) :
while ($slide_posts->have_posts()) :
$slide_posts->the_post();
$post_actual = $slide_posts -> current_post;
if($post_actual == 0) { ?>
<h1><?php the_title(); ?></h1>
<p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="btn btn-primary "><?php _e('Leer más...', 'ega'); ?></a></p>
<div>
<?php
the_excerpt();
?>
</div>
<?php }
endwhile;
else:
get_template_part('loops/loop', 'empty');
endif;
wp_reset_postdata();
} ?>
</li>
<li>
<?php
if ( $img_slide2 && !empty( $img_slide2 ) ) { ?>
<a href="<?php if( $url_slide2 && !empty( $url_slide2 ) ) { echo $url_slide2; } else { echo '#'; } ?>" title="<?php if ( $tt_slide2 && !empty( $tt_slide2 ) ) { echo $tt_slide2; } else { echo "titulo no disponible"; }?>">
<img src="<?php echo $img_slide2 ?>" alt="<?php if( $tt_slide2 && !empty( $tt_slide2 ) ) { echo $tt_slide2; } ?>" title="<?php if( $tt_slide2 && !empty( $tt_slide2 ) ) { echo $tt_slide2; } ?>" />
</a>
<span>
<?php if ( $tt_slide2 && !empty( $tt_slide2 ) ) { ?>
<h2><?php echo $tt_slide2 ?></h2>
<?php } else { ?>
<h2>Title 2</h2>
<?php }
if ( $desc_slide2 && !empty( $desc_slide2 ) ) { ?>
<p><?php echo $desc_slide2 ?></p>
<?php } else { ?>
<p>Lorem ipsum dolor...</p>
<?php } ?>
</span>
<?php } else {
$slide_posts = new WP_Query("post_type=post&post_status=publish");
if ( $slide_posts->have_posts() ) :
while ($slide_posts->have_posts()) :
$slide_posts->the_post();
$post_actual = $slide_posts -> current_post;
if($post_actual == 1) { ?>
<h1><?php the_title(); ?></h1>
<p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="btn btn-primary "><?php _e('Leer más...', 'ega'); ?></a></p>
<div>
<?php
the_excerpt();
?>
</div>
<?php }
endwhile;
else:
get_template_part('loops/loop', 'empty');
endif;
wp_reset_postdata();
} ?>
</li>
<li>
<?php
if ( $img_slide3 && !empty( $img_slide3 ) ) { ?>
<a href="<?php if( $url_slide3 && !empty( $url_slide3 ) ) { echo $url_slide3; } else { echo '#'; } ?>" title="<?php if ( $tt_slide3 && !empty( $tt_slide3 ) ) { echo $tt_slide3; } else { echo "titulo no disponible"; }?>">
<img src="<?php echo $img_slide3 ?>" alt="<?php if( $tt_slide3 && !empty( $tt_slide3 ) ) { echo $tt_slide3; } ?>" title="<?php if( $tt_slide3 && !empty( $tt_slide3 ) ) { echo $tt_slide3; } ?>" />
</a>
<span>
<?php if ( $tt_slide3 && !empty( $tt_slide3 ) ) { ?>
<h2><?php echo $tt_slide3 ?></h2>
<?php } else { ?>
<h2>Title 3</h2>
<?php }
if ( $desc_slide3 && !empty( $desc_slide3 ) ) { ?>
<p><?php echo $desc_slide3 ?></p>
<?php } else { ?>
<p>Lorem ipsum dolor...</p>
<?php } ?>
</span>
<?php } else {
$slide_posts = new WP_Query("post_type=post&post_status=publish");
if ( $slide_posts->have_posts() ) :
while ($slide_posts->have_posts()) :
$slide_posts->the_post();
$post_actual = $slide_posts -> current_post;
if($post_actual == 2) { ?>
<h1><?php the_title(); ?></h1>
<p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="btn btn-primary "><?php _e('Leer más...', 'ega'); ?></a></p>
<div>
<?php
the_excerpt();
?>
</div>
<?php }
endwhile;
else:
get_template_part('loops/loop', 'empty');
endif;
wp_reset_postdata();
} ?>
</li>
<li>
<?php
if ( $img_slide4 && !empty( $img_slide4 ) ) { ?>
<a href="<?php if( $url_slide4 && !empty( $url_slide4 ) ) { echo $url_slide4; } else { echo '#'; } ?>" title="<?php if ( $tt_slide4 && !empty( $tt_slide4 ) ) { echo $tt_slide4; } else { echo "titulo no disponible"; }?>">
<img src="<?php echo $img_slide4 ?>" alt="<?php if( $tt_slide4 && !empty( $tt_slide4 ) ) { echo $tt_slide4; } ?>" title="<?php if( $tt_slide4 && !empty( $tt_slide4 ) ) { echo $tt_slide4; } ?>" />
</a>
<span>
<?php if ( $tt_slide4 && !empty( $tt_slide4 ) ) { ?>
<h2><?php echo $tt_slide4 ?></h2>
<?php } else { ?>
<h2>Title 4</h2>
<?php }
if ( $desc_slide4 && !empty( $desc_slide4 ) ) { ?>
<p><?php echo $desc_slide4 ?></p>
<?php } else { ?>
<p>Lorem ipsum dolor...</p>
<?php } ?>
</span>
<?php } else {
$slide_posts = new WP_Query("post_type=post&post_status=publish");
if ( $slide_posts->have_posts() ) :
while ($slide_posts->have_posts()) :
$slide_posts->the_post();
$post_actual = $slide_posts -> current_post;
if($post_actual == 3) { ?>
<h1><?php the_title(); ?></h1>
<p><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="btn btn-primary "><?php _e('Leer más...', 'ega'); ?></a></p>
<div>
<?php
the_excerpt();
?>
</div>
<?php }
endwhile;
else:
get_template_part('loops/loop', 'empty');
endif;
wp_reset_postdata();
} ?>
</li>
</ul>
</div>
<div id="progress">
</div>
<div id="overlay">
</div>
<div id="pause">
</div>
</div>
</div>
</div>
</div>
</header>