-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloop.php
103 lines (94 loc) · 3.05 KB
/
loop.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
102
103
<?php
/**
* The loop
* El loop
*
* @package vbt
*/
?>
<?php if (! is_home()): ?>
<div class="page-header">
<h1><?php echo vbt_get_loop_title(); ?></h1>
</div>
<?php if (is_author()): ?>
<?php if ( get_the_author_meta( 'description' ) ) : ?>
<section id="vbt-author-info">
<figure>
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'vbt_author_bio_avatar_size', 60 ) ); ?>
</figure>
<h2>
<?php printf( __( 'Acerca de %s', 'vbt' ), get_the_author() ); ?>
</h2>
<p class="description"><?php the_author_meta( 'description' ); ?></p>
</section>
<?php endif ?>
<?php endif ?>
<?php endif; ?>
<section id="vbt-content" class="col-md-8">
<!-- Posts loop -->
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="post-header">
<div class="post-thumbnail">
<?php if(has_post_thumbnail()): ?>
<a href="<?php the_permalink(); ?>" title="<?php echo the_title_attribute( 'echo=0' ); ?>" rel="nofollow">
<?php the_post_thumbnail('large'); ?>
</a>
<?php else:?>
<div class="image-not-found">
<img
class="attachment-large size-large wp-post-image"
width="700"
height="354"
alt="<?php echo __('Imagen no encontrada'); ?>"
src="<?php echo get_template_directory_uri(); ?>/images/image-not-found.png"
sizes="(max-width: 700px) 100vw, 700px">
</div>
<?php endif; ?>
</div>
<div class="post-info">
<ul class="list-unstyled list-inline">
<li>
<span class="glyphicon glyphicon-time"></span> <?php echo get_the_date(); ?>
</li>
<li>
<span class="glyphicon glyphicon-user"></span>
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="nofollow">
<i><?php echo get_the_author(); ?></i>
</a>
</li>
<li>
<span class="glyphicon glyphicon-folder-open"></span>
<b><?php echo __( 'Publicado en' , 'vbt' ) . ': ';?></b>
<?php the_category(', '); ?>
</li>
<li>
<span class="glyphicon glyphicon-comment"></span>
<?php comments_popup_link( '0', '1', '%' ); ?>
</li>
</ul>
</div>
<div class="post-title">
<h2>
<a href="<?php the_permalink(); ?>" title="<?php echo the_title_attribute( 'echo=0' ); ?>">
<?php the_title(); ?>
</a>
</h2>
</div>
</header>
<div class="the-content">
<?php the_excerpt( __( 'Saber más;' , 'vbt' ) ); ?>
</div>
<footer class="post-footer">
<?php $tags_list = get_the_tag_list( '', ' ' ); ?>
<?php if ( $tags_list ): ?>
<div class="post-tags">
<span class="glyphicon glyphicon-tags"></span>
<?php echo $tags_list ; ?>
</div>
<?php endif; ?>
<?php edit_post_link( __( 'Editar', 'vbt' ), '<p class="edit">', '</p>' ); ?>
</footer>
</article>
<?php endwhile; // end post loop?>
</section>