-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-portifolios.php
101 lines (84 loc) · 2.41 KB
/
archive-portifolios.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
*
*Template Name: Portifolio
*
*
* The template for displaying portifolio page
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that other
* 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage WpStrap
* @since wpstrap 1.0
*/
get_header(); ?>
<header class="well">
<div class="container">
<?php olaw2jr_breadcrumbs(); ?>
</div>
</header>
<div class="container">
<div id="options" class="clearfix container">
<?php
$terms = get_terms("portifolio-type");
$count = count($terms);
echo '<ul id="filters" class="pagination option-set clearfix" data-option-key="filter">';
echo '<li><a href="#" data-filter="*">show all</a></li>';
if ( $count > 0 ){
foreach ( $terms as $term ) {
$termname = strtolower($term->name);
$termname = str_replace(' ', '-', $termname);
echo '<li><a href="#" data-filter=".'.$termname.'">'.$term->name.'</a></li>';
}
}
echo "</ul>";
?>
</div>
<div class="row">
<div id="container" class="clearfix isotope">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$custom = get_post_custom($post->ID);
$website = $custom["website"][0];
$client = $custom["client"][0];
$logo= get_the_post_thumbnail($post->ID);
?>
<?php
$terms = get_the_terms( $post->ID, 'portifolio-type' );
if ( $terms && ! is_wp_error( $terms ) ) :
$links = array();
foreach ( $terms as $term )
{
$links[] = $term->name;
}
$links = str_replace(' ', '-', $links);
$tax = join( " ", $links );
else :
$tax = '';
endif;
?>
<div id="element" class="col-md-4 element <?php echo strtolower($tax); ?>">
<div class="panel panel-default">
<div class="panel-heading text-center"><a href="<?php the_permalink(); ?>"><?php the_title(); ?> </a>
</div>
<div class="panel-body">
<p><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('portifolio'); ?></a></p>
</div>
<div class="panel-footer">
<a href="<?php the_permalink(); ?>" class="btn btn-block btn-primary">More info</a>
</div>
</div>
</div>
<?php endwhile; else: ?>
<p><?php _e('No Porejects were found. Sorry!'); ?></p>
<?php endif; ?>
</div>
</div>
</div>
<?php
// Gets footer.php
get_footer();
?>