-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-what-i-do.php
More file actions
109 lines (92 loc) · 2.91 KB
/
page-what-i-do.php
File metadata and controls
109 lines (92 loc) · 2.91 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
<?php
/*
@package Olegs
Template Name: What I Do
*/
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">
<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 class="p-name"><strong><?php the_title(); ?></strong></span>
</h1>
</div>
</header>
</section>
<div class="about-content">
<article>
<?php the_content(); ?>
<ul class="what-i-do">
<?php
$args = array(
'post_type' => 'services',
'orderby' => 'menu_order',
'posts_per_page' => -1,
'order' => 'ASC'
);
$the_query = new WP_Query($args);
if( $the_query->have_posts() ): while( $the_query->have_posts() ) : $the_query->the_post(); ?>
<li class="what-i-do__item">
<a href="<?php $whatidourl = get_post_meta($post->ID, 'what-i-do_link', true); echo $whatidourl; ?>" class="what-i-do__link">
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
</a>
</li>
<?php endwhile; else: ?>
<h3>Sorry, no matched your criteria.</h3>
<?php endif; wp_reset_query(); ?>
</ul><!-- what-i-do -->
<p class="align-center"><a class="btn" href="https://olegs.be/contatti/" role="button"><?php _e('Mettiamoci in contatto', 'olegs'); ?></a></p>
</article>
</div>
</div>
<?php endwhile; // end of the loop. ?>
<?php get_footer(); ?>