-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-left-sidebar.php
52 lines (42 loc) · 1.61 KB
/
template-left-sidebar.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
<?php
/*
Template Name: Left Sidebar
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div class="module-left">
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<!-- on capture le thumbnail pour le background -->
<?php $image_src = wp_get_attachment_image_src( get_post_thumbnail_id(),'full' ); ?>
<?php $image_bg = $image_src[0]; ?>
<?php endwhile; // end of the loop. ?>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<script type="text/javascript">
//======= Home ========//
jQuery(function($){
$.supersized({
// Functionality
start_slide : 0, // Start slide (0 is random)
new_window : 1, // Image links open in new window/tab
image_protect : 1, // Disables image dragging and right click with Javascript
// Size & Position
min_width : 0, // Min width allowed (in pixels)
min_height : 0, // Min height allowed (in pixels)
vertical_center : 1, // Vertically center background
horizontal_center : 1, // Horizontally center background
fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions)
fit_portrait : 1, // Portrait images will not exceed browser height
fit_landscape : 0, // Landscape images will not exceed browser width
// Components
slides : [ // Slideshow Images
{image : '<?php echo $image_bg; ?>', title : 'Restaurant Esprit du 12eme'}
]
});
});
</script>
<?php get_footer(); ?>