This repository was archived by the owner on May 8, 2021. It is now read-only.
forked from Proteus-tech/ekuatorial
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathloop.php
More file actions
86 lines (79 loc) · 2.58 KB
/
loop.php
File metadata and controls
86 lines (79 loc) · 2.58 KB
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
<ul class="list-posts row">
<?php while(have_posts()) : the_post(); ?>
<li id="post-<?php the_ID(); ?>" <?php post_class('post-item four columns'); ?>>
<article>
<header class="post-header">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php
if(has_post_thumbnail())
the_post_thumbnail('post-thumb');
else
echo '<img src="' . get_post_meta($post->ID, 'picture', true) . '" />';
?>
</a>
<h2>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php if (get_post_meta($post->ID, 'is_label', true) == "1"): ?>
<br><a href="#"><span class="label">Belt and Road</span></a>
<?php endif; ?>
</h2>
<p class="meta clearfix">
<span class="date">
<span class="lsf"></span>
<span class="date-content"><?php echo get_the_date('m/d/Y'); ?></span>
</span>
<?php
if(get_the_terms($post->ID, 'publisher')) :
?>
<span class="publisher">
<span class="lsf">clip</span>
<span class="publisher-content">
<?php
$terms_arr = get_the_terms($post->ID, 'publisher');
$first_term = array_shift($terms_arr);
// by mohjak: 2019-11-21 excel line 23 issue#120
$first_term_name = $first_term->name;
echo $first_term_name;
?>
</span>
</span>
<?php
endif;
?>
</p>
</header>
<section class="post-content">
<?php the_excerpt(); ?>
</section>
<footer class="post-actions">
<div class="buttons">
<a class="button" href="<?php the_permalink(); ?>"><?php _e('Read more', 'ekuatorial'); ?></a>
<a class="button" href="<?php echo jeo_get_share_url(array('p' => $post->ID)); ?>"><?php _e('Share', 'ekuatorial'); ?></a>
</div>
</footer>
</article>
</li>
<?php endwhile; ?>
</ul>
<div class="twelve columns">
<?php if(function_exists('wp_paginate')) wp_paginate(); ?>
</div>
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('.list-posts').imagesLoaded(function() {
var $media = $('.list-posts .media-limit img');
$media.each(function() {
var containerHeight = $(this).parents('.media-limit').height();
var imageHeight = $(this).height();
var topOffset = (containerHeight - imageHeight) / 2;
if(topOffset < 0) {
$(this).css({
'margin-top': topOffset
});
}
});
});
});
})(jQuery);
</script>