-
Notifications
You must be signed in to change notification settings - Fork 0
/
about-us-page.php
187 lines (160 loc) · 7.23 KB
/
about-us-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
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
<?php
/**
* Template Name: About us page
*/
get_header();
?>
<section class="section-hero-about animated slide-in-diagonal">
<div class="blog-label mb-[1rem] ">
<span>About
Us</span>
</div>
<div class="hero-about-header font-bold w-[88%]">
<div class="text we-are"><?php echo get_theme_mod('about_text_1', 'We are'); ?></div>
<div class="text number"><?php echo get_theme_mod('about_number', '122'); ?></div>
<div class="text vertical">
<div><?php echo get_theme_mod('about_text_2', 'Digital'); ?></div>
<div><?php echo get_theme_mod('about_text_3', 'Nerds'); ?></div>
</div>
</div>
<div class="hero-about-icons">
<?php
$cards = array();
for ($i = 1; $i <= 4; $i++) {
$cards[] = array(
'order' => get_theme_mod("about_page_card_{$i}_order", $i),
'image' => get_theme_mod("about_page_card_{$i}_image"),
'text' => get_theme_mod("about_page_card_{$i}_text"),
'title' => get_theme_mod("about_page_card_{$i}_title"),
);
}
usort($cards, function ($a, $b) {
return $a['order'] - $b['order'];
});
foreach ($cards as $card): ?>
<div class="about-us-item">
<div class="icon-wrapper">
<img src="<?php echo $card['image']; ?>" alt="product owner">
</div>
<div class="role-name"> <?php echo $card['title']; ?></div>
</div>
<?php endforeach; ?>
</div>
</section>
<section class="section-content-about">
<div class="content-about-header"></div>
<div class="content-about-main">
<div class="main-content">
<?php
$about_query = new WP_Query(
array(
'post_type' => 'about',
'posts_per_page' => -1,
)
);
if ($about_query->have_posts()):
$index = 0;
while ($about_query->have_posts()):
$about_query->the_post();
// Setting element class
$class = ($index % 2 == 0) ? 'main-item-a' : 'main-item-b';
?>
<div class="<?php echo $class; ?>">
<?php if ($class == 'main-item-a'): ?>
<div class="item-image-wrapper">
<?php if (has_post_thumbnail()): ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="item-body">
<div class="item-header"><?php the_title(); ?></div>
<div class="item-text">
<?php
$excerpt = get_post_meta(get_the_ID(), '_about_post_excerpt', true);
if (!empty($excerpt)) {
echo wp_trim_words($excerpt, 30, '...');
} else {
$content = get_the_content();
$trimmed_content = wp_trim_words($content, 30, '...');
echo $trimmed_content;
}
?>
</div>
<div class="item-button"><a href="<?php the_permalink(); ?>"><span>Mehr erfahren</span></a></div>
</div>
<?php if ($class == 'main-item-b'): ?>
<div class="item-image-wrapper">
<?php if (has_post_thumbnail()): ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<?php
$index++;
endwhile;
wp_reset_postdata();
else:
echo '<p>No posts found.</p>';
endif;
?>
</div>
<!-- <div class="main-item-a">
<div class="item-image-wrapper">
<img src="<?php echo get_template_directory_uri(); ?>/images/was_machen_wir.png" alt="">
</div>
<div class="item-body">
<div class="item-header">Was machen wir?</div>
<div class="item-text">Introduction Testing email functionality
during the
pre-production
phase is critical to ensuring that emails are delivered correctly and with the
necessary content. However, test-users or test data...</div>
<div class="item-button"><a href="/what-we-do"><span>Mehr erfahren</span></a></div>
</div>
</div>
<div class="main-item-b">
<div class="item-body">
<div class="item-header">Wo arbeiten wir?</div>
<div class="item-text">Introduction Testing email functionality
during the
pre-production
phase is critical to ensuring that emails are delivered correctly and with the
necessary content. However, test-users or test data...</div>
<div class="item-button"><span>Mehr erfahren</span></div>
</div>
<div class="item-image-wrapper"> <img
src="<?php echo get_template_directory_uri(); ?>/images/wo_arbeiten_wir.png" alt=""></div>
</div>
<div class="main-item-a">
<div class="item-image-wrapper">
<img src="<?php echo get_template_directory_uri(); ?>/images/wie_entwickeln_wir_software.png" alt="">
</div>
<div class="item-body">
<div class="item-header">Wie entwickeln wir software?</div>
<div class="item-text">Introduction Testing email functionality
during the
pre-production
phase is critical to ensuring that emails are delivered correctly and with the
necessary content. However, test-users or test data...</div>
<div class="item-button"><span>Mehr erfahren</span></div>
</div>
</div>
<div class="main-item-b">
<div class="item-body">
<div class="item-header">Agile Arbeitsweise</div>
<div class="item-text">Introduction Testing email functionality
during the
pre-production
phase is critical to ensuring that emails are delivered correctly and with the
necessary content. However, test-users or test data...</div>
<div class="item-button"><span>Mehr erfahren</span></div>
</div>
<div class="item-image-wrapper"> <img
src="<?php echo get_template_directory_uri(); ?>/images/agile_arbeitsweise.png" alt=""></div>
</div> -->
</div>
</section>
<?php
get_footer();