Repository navigation
Expand file tree
/
Copy pathfront-page.php
More file actions
145 lines (131 loc) · 5.94 KB
/
Copy pathfront-page.php
File metadata and controls
145 lines (131 loc) · 5.94 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
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
<?php
get_header(); ?>
<section class="container has-text-centered " style="background: #F4F5F9;">
<div class="columns ">
<aside class="column" >
<div id="left-text-name" >
<h1 class="title is-5">
Hello, my name is <b>Aziz Segaoui</b></h1>
<h2 class="subtitle">
I build strong, beauty
Websites & Web apps.</h2>
</div>
</aside>
<aside class="column ">
<figure class="image" style="margin-bottom: 10px;">
<img src="<?php echo get_template_directory_uri()?>/img/websitephoto.png">
</figure>
</aside>
</div>
</section>
<section class="container section">
<div class="columns ">
<aside class="column hero">
<div class="hero-body has-text-centered ">
<h2 class="title is-5 has-text-centered" style="color:#2980B9">A few Selected PROJECTS</h2>
<!-- Start Showing randome projects!-->
<div class="columns project-item is-desktop">
<?php remove_all_filters('posts_orderby'); $args=array('post_type'=>'projects', 'orderby'=>'rand', 'posts_per_page'=>'4'); $projects=new WP_Query($args); while ($projects->have_posts()) : $projects->the_post(); ?>
<!-- Loop projects!-->
<aside class="column">
<figure class="image">
<a href="<?php the_permalink() ?>">
<?php if ( has_post_thumbnail()) : the_post_thumbnail(array(350,700)); else :?> <img src="http://placehold.it/200x200 "/><?php endif; ?>
<p><?php the_title(); ?></p>
</a>
</figure>
</aside>
<!-- End Loop projects!-->
<?php endwhile; wp_reset_postdata(); ?>
<!-- End Showing randome projects!-->
</div>
</div>
</aside>
</div>
</section>
<section class="container section" id="latest-articles">
<h2 class="title is-5 has-text-centered" style="color:#cb506f">Latest Posts From the blog</h1>
<div class="tile is-ancestor">
<div class="tile is-vertical is-12">
<?php
$args = array( 'numberposts' => '3', 'order'=> 'ASC');
$recent_posts = get_posts( $args );
foreach ( $recent_posts as $key=>$post ) :
setup_postdata( $post );
$post_tags = get_the_tags();
if($key==0):
?>
<div class="tile is-parent">
<article class="tile is-child">
<header >
<a href="<?php the_permalink();?>"><h3 class="title is-5"><?php the_title(); ?> </h3></a>
<?php
echo '<p class="subtitle">';
if ( $post_tags ) {
foreach( $post_tags as $tag ) {
echo '<span class="tag">'.$tag->name . '</span> ';
}
}
echo '</p>';
?>
</header>
<figure class="image 3">
<?php
the_post_thumbnail('full'); ?>
</figure>
</article>
</div>
<?php
elseif($key==1):
?>
<div class="tile">
<div class="tile is-parent is-vertical">
<article class="tile is-child">
<header>
<a href="<?php the_permalink();?>"> <h3 class="title is-5"><?php the_title(); ?> </h3></a>
<?php
echo '<p class="subtitle">';
if ( $post_tags ) {
foreach( $post_tags as $tag ) {
echo '<span class="tag">'.$tag->name . '</span> ';
}
}
echo '</p>';
?>
</header>
<figure class="image is-2by1">
<?php the_post_thumbnail(); ?>
</figure>
</article>
</div>
<?php
else:?>
<div class="tile is-parent">
<article class="tile is-child">
<header>
<a href="<?php the_permalink();?>"> <h3 class="title is-5"><?php the_title(); ?> </h3></a>
<?php
echo '<p class="subtitle">';
if ( $post_tags ) {
foreach( $post_tags as $tag ) {
echo '<span class="tag">'.$tag->name . '</span> ';
}
}
echo '</p>';
?>
</header>
<figure class="image is-2by1">
<?php the_post_thumbnail(); ?>
</figure>
</article>
</div>
</div>
<?php
endif;
endforeach;
wp_reset_query();?>
</div>
</div>
</section>
<?php
get_footer(); ?>