This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
58 lines (53 loc) · 2.15 KB
/
footer.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
<?php
$args = array(
'category_name' => 'bottom-posts',
'posts_per_page' => 3,
);
$query_bottom_posts = new WP_Query($args);
?>
<footer>
<section class="client-blog">
<div class="grid-container">
<div class="flex-container flex-dir-column large-flex-dir-row">
<?php
// The Loop
if ($query_bottom_posts->have_posts()) {
//trying to get a "stagger effect" for each card to animate in, but looks like I would need to build something custom
$number = 60;
while ($query_bottom_posts->have_posts()) {
$query_bottom_posts->the_post(); ?>
<div data-aos="fade-up" data-aos-delay="<?php echo $number += 60?>" data-aos-offset="<?php echo $number += 60?>" data-aos-easing="ease-in" class="client-blog__item">
<!-- check to see if a thumbnail is set-->
<?php if (has_post_thumbnail($post->ID)) : ?>
<!-- If there is, get the source URL for the thumbnail size-->
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium'); ?>
<div class="image" style="background-image:url('<?php echo $image[0]; ?>');"></div>
<!-- If no thumbnail is set, use the default image in the theme-->
<?php else : ?>
<div class="image" style="background-image:url('<?php echo get_template_directory_uri() . '/assets/img/default-headshot.jpg' ?>');"></div>
<?php endif; ?>
<div class="author">
<h5><?php the_author_meta('display_name', $user_id); ?></h5>
<div class="company"><?php the_author_meta('company', $user_id); ?></div>
<div class="quote">
<?php the_excerpt(); ?>
</div>
</div>
</div>
<?php }
} else {
echo 'sorry, no post found';
}
/* Restore original Post Data */
wp_reset_postdata();
?>
</div>
<div class="client-blog__button">
<button href="/" class="button button--full">view more</button>
</div>
</div>
</section>
</footer>
<?php wp_footer(); ?>
</body>
</html>