-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.php
executable file
·85 lines (57 loc) · 1.78 KB
/
category.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
<?php get_header(); ?>
<section id="content">
<div class="container">
<div class="page-title">
<h2><?php single_cat_title( '', true ); ?></h2>
</div>
<article class="row category-grid">
<?php while( have_posts() ) : the_post(); ?>
<?php if( has_post_thumbnail() ) : ?>
<div <?php post_class('span4 relative premise-same-height'); ?> style="margin-top:0;margin-left:0;">
<a href="<?php the_permalink(); ?>" class="block">
<?php the_post_thumbnail('full', array('class' => 'responsive')); ?>
</a>
<div class="post-details absolute">
<a href="<?php the_permalink(); ?>" class="block">
<h2><?php the_title(); ?></h2>
</a>
<div class="block">
<?php the_excerpt(); ?>
</div>
</div>
</div>
<?php else : ?>
<div <?php post_class('span4 relative premise-same-height'); ?> style="margin-top:0;margin-left:0;">
<a href="<?php the_permalink(); ?>" class="block">
<img src="" class="resopnsive">
</a>
<div class="post-details absolute">
<a href="<?php the_permalink(); ?>" class="block">
<h2><?php the_title(); ?></h2>
</a>
<div class="block">
<?php the_excerpt(); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php endwhile; ?>
</article>
</div>
</section>
<script>
jQuery(function($){
$(window).load(function(){
//set same height for elements were needed
var currentTallest = 0;
$('.premise-same-height').each(function(){
if ($(this).height() > currentTallest) {
currentTallest = $(this).height();
}
});
//set tallest as min-height
$('.premise-same-height').css({'min-height': currentTallest});
});
});
</script>
<?php get_footer(); ?>