-
Notifications
You must be signed in to change notification settings - Fork 1
/
front-page.php
85 lines (80 loc) · 2.71 KB
/
front-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
<?php get_header(); ?>
<div id="banner">
<h1><Bedsitter_iO/></h1>
<h3>When you learn, teach, </h3>
<h3>when you get, give.<h3>
</div>
<main>
<a href="<?php echo site_url('/blog'); ?>">
<h2 class="section-heading">Latest Tutorials</h2>
</a>
<section>
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 8,
);
$blogposts = new WP_Query($args);
while ($blogposts->have_posts()) {
$blogposts->the_post();
?>
<div class="card">
<div class="card-image">
<a href="<?php echo the_permalink();?>">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID()); ?>"
alt="Card Image">
</a>
</div>
<div class="card-description">
<a href="<?php echo the_permalink();?>">
<h3><?php echo the_title();?></h3>
</a>
<p>
<?php echo wp_trim_words(get_the_excerpt(), 36);?>
</p>
<a href="<?php echo the_permalink();?>" class="btn-readmore">Read more</a>
</div>
</div>
<?php }
wp_reset_query(); ?>
</section>
<!-- <h2 class="section-heading">All Projects</h2>
<section>
<?php
$args = array(
'post_type' => 'product',
'posts_per_page' => 2,
);
$products = new WP_Query($args);
while ($products->have_posts()) {
$products->the_post();
?>
<div class="card">
<div class="card-image">
<a href="<?php echo the_permalink();?>">
<img src="<?php echo get_the_post_thumbnail_url(get_the_ID()); ?>"
alt="Card Image">
</a>
</div>
<div class="card-description">
<a href="<?php echo the_permalink();?>">
<h3><?php echo the_title();?></h3>
</a>
<p>
<?php echo wp_trim_words(get_the_excerpt(), 36);?>
</p>
<a href="<?php echo the_permalink();?>" class="btn-readmore">Read more</a>
</div>
</div>
<?php }
wp_reset_query();
?>
</section> -->
<h2 class="section-heading">Source Code</h2>
<section id="section-source">
<p>
Source code for all the tutorials are a stored in the following Github organization/repository.
</p>
<a href="https://github.com/bedsitter-io" class="btn-readmore">Bedsitter iO Github Repositories</a>
</section>
<?php get_footer(); ?>