-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathportfolio.php
executable file
·82 lines (48 loc) · 2.06 KB
/
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
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
<?php
/*
Template Name: Portfolio
*/
get_template_part( 'header' ); ?>
<section id="primary_content">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry_header">
<!--INSERT OPTION in page to display or not-->
<h1 class="entry_title"><?php the_title(); ?></h1>
<!---->
</header><!-- .entry-header -->
<div class="entry_content">
<ul id="filters">
<li><a href="#" data-filter="*">show all</a></li>
<li><a href="#" data-filter=".metal">metal</a></li>
<li><a href="#" data-filter=".transition">transition</a></li>
<li><a href="#" data-filter=".alkali, .alkaline-earth">alkali and alkaline-earth</a></li>
<li><a href="#" data-filter=":not(.transition)">not transition</a></li>
<li><a href="#" data-filter=".metal:not(.transition)">metal but not transition</a></li>
</ul>
<?php
if ( get_query_var('paged') ) $paged = get_query_var('paged');
if ( get_query_var('page') ) $paged = get_query_var('page');
$query = new WP_Query( array( 'post_type' => 'portfolio', 'paged' => $paged ) );
if ( $query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="portfolio_entry">
<?php sic_featured();?>
<?php the_content(); ?>
</div>
<?php endwhile; wp_reset_postdata(); ?>
<!-- show pagination here -->
<?php else : ?>
<!-- show 404 error here -->
<?php endif; ?>
<?php while ( have_posts() ) : the_post();
the_content(); ?>
</div><!-- .entry-content -->
<footer class="entry_meta">
<?php edit_post_link(); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<?php // get_template_part( 'loop-404' ); ?>
</section><!--primary_content-->
<?php // get_template_part( 'sidebar' ); ?>
<?php get_template_part( 'footer' ); ?>