-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-portfolio.php
42 lines (29 loc) · 990 Bytes
/
page-portfolio.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
<?php
/**
* Template Name: Portfolio Page
*
* @package delighted_calligraphy
*/
get_header(); ?>
<main id="main" role="main" class="portfolio pad">
<?php while ( have_posts() ) : the_post(); ?>
<section <?php post_class(); ?>>
<h1 class="portfolio-title"><?php the_title(); ?></h1>
</section>
<?php endwhile; // end of the loop. ?>
<?php
$args = array( 'post_type' => 'portfolio' );
$query = new WP_Query( $args );
?>
<?php if ( $query->have_posts()) : while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="item">
<figure>
<a href="<?php the_permalink(); ?>" class="portfolio-link"><?php the_post_thumbnail('large'); ?></a>
<h2>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
</figure>
</div>
<?php endwhile; endif; ?>
</main>
<?php get_footer(); ?>