-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·65 lines (53 loc) · 1.77 KB
/
index.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
<?php
get_header();
?>
<!-- Main -->
<div id="main">
<section id="one">
<?php
$posts = get_posts(array('numberposts' => 1, 'orderby' => 'post_date', 'order' => 'ASC'));
foreach ($posts AS $post):
setup_postdata($post);
?>
<header class="major">
<h2><?php the_title();?></h2>
</header>
<p><?php the_excerpt(); ?> </p>
<ul class="actions">
<li><a href="<?php the_permalink(); ?>" class="button">Learn More</a></li>
</ul>
<?php endforeach;
wp_reset_postdata();
wp_reset_query();
?>
</section>
<!-- recent portfolio -->
<section id="two">
<h2>Recent Work</h2>
<div class="row">
<?php
$recents = get_posts(array('numberposts' => 6, 'orderby' => 'post_date', 'order' => 'DESC', 'exclude' => ''));
foreach ($recents AS $post):
setup_postdata($post);
if ( has_post_thumbnail() ) {
$smallimg = get_the_post_thumbnail($post->ID, 'portfoliothumbs' );
$bigimg = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
}
else {
$smallimg = '<img src="'.get_bloginfo( 'stylesheet_directory' ) . '/images/thumbs/01.jpg">';
$bigimg = get_bloginfo('stylesheet_directory' ).'/images/fulls/01.jpg';
}
?>
<article class="6u 12u$(xsmall) work-item">
<a href="<?php echo $bigimg; ?>" class="image fit thumb"><?php echo $smallimg; ?></a>
<h3><?php the_title();?></h3>
<p><?php the_excerpt(); ?></p>
</article>
<?php
endforeach;
wp_reset_postdata();
?>
</div>
</section>
</div>
<?php get_footer(); ?>