-
Notifications
You must be signed in to change notification settings - Fork 1
/
page.php
62 lines (50 loc) · 1.83 KB
/
page.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
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Swift Industries
*/
get_header(); ?>
<div id="primary" class="content-area">
<?php while ( have_posts() ) : the_post(); ?>
<?php if( has_post_thumbnail() ) : ?>
<?php $mobile = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'product-banner-mobile' ); ?>
<?php $tablet = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'product-banner-tablet' ); ?>
<?php $desktop = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'product-banner-desktop' ); ?>
<?php $retina = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'product-banner-retina' ); ?>
<picture class="document-header-image">
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source
srcset="<?php echo $mobile[0]; ?>"
media="(max-width: 500px)" />
<source
srcset="<?php echo $tablet[0]; ?>"
media="(max-width: 860px)" />
<source
srcset="<?php echo $desktop[0]; ?>"
media="(max-width: 1180px)" />
<source
srcset="<?php echo $retina[0]; ?>"
media="(min-width: 1181px)" />
<!--[if IE 9]></video><![endif]-->
<img srcset="<?php echo $image[0]; ?>">
</picture>
<?php endif; ?>
<?php
$post = get_post( $post_id );
$slug = $post->post_name;
?>
<div class="page-content-container <?php echo $slug; ?>">
<div class="page-content">
<!-- <h1 class="page-title"><?php the_title(); ?></h1> -->
<?php the_content(); ?>
</div>
</div>
<?php endwhile; // end of the loop. ?>
</div><!-- #primary -->
<?php get_footer(); ?>