-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-about.php
More file actions
90 lines (78 loc) · 2.43 KB
/
page-about.php
File metadata and controls
90 lines (78 loc) · 2.43 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
<?php
/*
@package Olegs
Template Name: About
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php // Get attachment original size image URL
$thumb_full = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
$thumb_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' );
$thumb_medium = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' );
$thumb_url_full = $thumb_full['0'];
$thumb_url_large = $thumb_large['0'];
$thumb_url_medium = $thumb_medium['0'];
?>
<style>
.gallery-cover {
background-image: url( <?php echo $thumb_url_medium; ?> );
}
@media all and (min-width: 320px) and (min-resolution: 2dppx) {
.gallery-cover {
background-image: url( <?php echo $thumb_url_large; ?> );
}
}
@media all and (min-width: 768px) {
.gallery-cover {
background-image: url( <?php echo $thumb_url_large; ?> );
}
}
@media all and (min-width: 768px) and (min-resolution: 2dppx) {
.gallery-cover {
background-image: url( <?php echo $thumb_url_full; ?> );
}
}
@media all and (min-width: 992px) {
.gallery-cover {
background-image: url( <?php echo $thumb_url_full; ?> );
}
}
</style>
<div itemscope itemtype="https://schema.org/Person">
<section class="gallery-cover h-card">
<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="<?php echo $thumb_url_full; ?>">
<meta itemprop="width" content="1620px">
<meta itemprop="height" content="1080px">
</span>
<header>
<div class="vertical-align">
<h2><?php $theshorttitle = get_post_meta($post->ID, 'about_contacts_title', true); echo $theshorttitle; ?></h2>
<?php wp_nav_menu( array(
'theme_location' => 'footer-social',
'container' => false,
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul class="about-get-in-touch">%3$s</ul>',
'echo' => true,
'walker' => new My_Walker_Nav_Menu(),
) );
?>
</div>
<div>
<h1>
<span itemprop="name" class="p-name"><strong><?php the_title(); ?></strong></span>
<br>
<span itemprop="jobTitle" class="p-role"><?php the_excerpt_rss(); ?></span>
</h1>
</div>
</header>
</section>
<div class="about-content">
<article>
<?php the_content(); ?>
</article>
</div>
</div>
<?php endwhile; // end of the loop. ?>
<?php get_footer(); ?>